;
; Here is the current documentation for the description script.
; - This file describes what goes on the floppy itself, list of files, boot sectors, locations, ...
; - The result is stored in a description file which along with the loader code allows the user to load data.
;
; Syntax:
; - Anything at the right of a ; is ignored (commented out)
; - {FileIndex} is replaced at generation time by the current internal file index, practical for defines generation
;
; Things to do:
; - Be able to define the format of the floppy we want in this file (number of tracks, sectors, sizes)
; - Suppress the need for a source floppy to clone from
; - Have a 0/1 parameter for the multiple calls to the tool, with only the last one needing the files
; - Support for tap files (auto-detect loading area)
; - Support for file compression in the tool
; - Possibility to do partial loads, saves, depacking in realtime
;
FormatVersion 0.20

;LoadDiskTemplate default.dsk
DefineDisk 2 42 17							; 2 sides, 42 tracks, 17 sectors

OutputLayoutFile floppy_description.h
OutputFloppyFile ..\build\GlobalGameJam2015.dsk

;AddDefine LOADER_SHOW_DEBUGINFO 1
;AddDefine ENABLE_TIMING_DEBUGGING 1
AddDefine LOADER_SECTOR_BUFFER $200
AddDefine LOADER_BASE_ZERO_PAGE $00

;
; This defines the bootsectors to use for the various operating systems
; - Jasmin loads the sector 1 of track zero in $400 and then runs it.
; - Microdisc loads the sector 2 of track zero, the address is different on Atmos and Telestrat
; - The system requires a third sector containing valid data
;
; Since we do not yet have a valid Jasmin reading code, all this bootsector will do is to 
; write a message saying that this floppy needs to be booted on a Microdisc compatible system.
;
SetPosition 0 1
WriteSector ..\build\files\sector_1-jasmin.o 		; Sector 1
WriteSector ..\build\files\sector_2-microdisc.o 	; Sector 2
WriteSector ..\build\files\sector_3.o 				; Sector 3

;
; Now here is the loader code, that one is Microdisc only
;
SetPosition 0 4
WriteLoader ..\build\files\loader.o $fe00 			; Sector 4

;
; From now on we compress data (The loader should not be compressed)
;
SetCompressionMode FilePack 						; So far only two modes: 'None' and 'FilePack'

;
; Then the files used in the demo
;
AddFile ..\build\files\game.o						; The main application
AddDefine LOADER_GAME_PROGRAM {FileIndex}
AddDefine LOADER_GAME_PROGRAM_ADDRESS $c000
AddDefine LOADER_GAME_PROGRAM_TRACK {FileTrack}
AddDefine LOADER_GAME_PROGRAM_SECTOR {FileSector}
AddDefine LOADER_GAME_PROGRAM_SIZE {FileSize}
AddDefine LOADER_GAME_PROGRAM_SIZE_COMPRESSED {FileSizeCompressed}

;
; The fonts
;
AddFile ..\build\files\Font6x8.hir    ; 9900=STD, 9D00=ALT
AddDefine LOADER_FONT_6x8 {FileIndex}

AddFile ..\build\files\Font6x6.hir
AddDefine LOADER_FONT_6x6 {FileIndex}

;
; The pictures
;
AddFile ..\build\files\funcom_logo_240x200.hir		  ; The 240x200 funcom logo
AddDefine LOADER_FUNCOM_LOGO {FileIndex}

AddFile ..\build\files\GlobalGameJamOslo.hir		      ; The 240x200 Global Game Jam Oslo logo
AddDefine LOADER_GAMEJAM_LOGO {FileIndex}


AddFile ..\build\files\valp_outline.hir		          ; The 240x200 Volvo Valp outline picture
AddDefine LOADER_VALP_OUTLINE {FileIndex}

AddFile ..\build\files\oslo_map.hir		              [description:Where do you want to go now?] [name:Map of Oslo]
AddDefine LOADER_OSLO_MAP {FileIndex}

AddFile ..\build\files\title_screen.hir
AddDefine LOADER_TITLE_SCREEN {FileIndex}

AddFile ..\build\files\ending_giveup.hir
AddDefine LOADER_ENDING_GIVEUP {FileIndex}

AddFile ..\build\files\ending_out_of_money.hir
AddDefine LOADER_ENDING_OUT_OF_MONEY {FileIndex}

AddFile ..\build\files\ending_out_of_time.hir
AddDefine LOADER_ENDING_OUT_OF_TIME {FileIndex}

AddFile ..\build\files\ending_victory.hir
AddDefine LOADER_ENDING_VICTORY {FileIndex}

AddFile ..\build\files\how_to_play.hir
AddDefine LOADER_HOW_TO_PLAY {FileIndex}

;
; Locations, 174x180 pictures
;
AddFile ..\build\files\location_vigeland.hir    [description:The Vigeland Park is the worlds largestsculpture park made by a single artist one of Norway most popular attractions] [name:Vigeland Park]
AddDefine LOADER_LOCATION_FIRST {FileIndex}
AddDefine LOADER_LOCATION_VIGELAND {FileIndex}

AddFile ..\build\files\location_opera.hir		  [description:The Opera is a weirdly shaped thing in the Oslo harbor] [name:Oslo Opera]
AddDefine LOADER_LOCATION_OPERA {FileIndex}

AddFile ..\build\files\location_holmenkolen.hir       		  [description:See the famous ski jump] [name:Holmenkolen]
AddDefine LOADER_LOCATION_HOLMENKOLEN {FileIndex}

AddFile ..\build\files\location_jernbanetorget.hir       		  [description:The Oslo train station is really the    city hub] [name:Oslo Sentralstajon]
AddDefine LOADER_LOCATION_OSLOS {FileIndex}

AddFile ..\build\files\location_akerbrygge.hir       		  [description:Boats, shopping malls, and expensive restaurants] [name:Aker Brygge]
AddDefine LOADER_LOCATION_AKERBRYGGE {FileIndex}

AddFile ..\build\files\location_kingscastle.hir       		  [description:Where the royal familly lives] [name:The Royal Palace]
AddDefine LOADER_LOCATION_KINGCASTLE {FileIndex}

AddFile ..\build\files\location_sognsvann.hir       		  [description:A nice lake, you can swim and take a walk] [name:Sognsvann]
AddDefine LOADER_LOCATION_SOGNSVANN {FileIndex}

AddFile ..\build\files\location_vikingship_museum.hir       		  [description:Hosts three nice viking ships] [name:Viking Ship Museum]
AddDefine LOADER_LOCATION_VIKINGSHIP {FileIndex}

AddFile ..\build\files\location_munch_museum.hir       		  [description:The Scream is there, among many other paintings] [name:Munch Museum]
AddDefine LOADER_LOCATION_MUNCHMUSEUM {FileIndex}

AddFile ..\build\files\location_ibsen_museum.hir       		  [description:Ibsen, famous Norwegian writter] [name:Ibsen Museum]
AddDefine LOADER_LOCATION_IBSENMUSEUM {FileIndex}

AddFile ..\build\files\location_norwegian_folk_museum.hir       		  [description:Many interesting things to see there,   including a beautiful stave church builtin the early 13th century] [name:Norwegian Folk Museum]
AddDefine LOADER_LOCATION_NORWEGIANFOLK {FileIndex}

AddFile ..\build\files\location_kon_tiki_museum.hir       		  [description:Learn about Thor Heyerdahl's expedition] [name:Kon-Tiki museum]
AddDefine LOADER_LOCATION_KONTIKI {FileIndex}

AddFile ..\build\files\location_akershus_fortress.hir       		  [description:The Oslo fortress, protecting from invaders comming by boat] [name:Akershus Fortress]
AddDefine LOADER_LOCATION_AKERSHUS {FileIndex}

AddFile ..\build\files\location_national_gallery.hir       		  [description:The other place where you can see the Scream. For free] [name:National Gallery]
AddDefine LOADER_LOCATION_NATIONALGALLERY {FileIndex}

AddFile ..\build\files\location_natural_history_museum.hir       		  [description:Dinosaurs and old stuff :)] [name:Natural History Museum]
AddDefine LOADER_LOCATION_NATURALHISTORY {FileIndex}
AddDefine LOADER_LOCATION_LAST {FileIndex}

;
; Audio
;
AddFile ..\build\files\FuncomJingle.raw				; The funcom jingle
AddDefine LOADER_FUNCOM_JINGLE {FileIndex}
