;
; 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\FloppyBuilderSample.dsk

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

;
; 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 $fd00 			; 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\FirstProgram.o 				; The "First program" picture
AddDefine LOADER_GAME_PROGRAM {FileIndex}
AddDefine LOADER_GAME_PROGRAM_ADDRESS $400
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}

AddFile ..\build\files\SecondProgram.o 				; The "Second program" picture
AddDefine LOADER_PROGRAM_SECOND {FileIndex}
AddDefine LOADER_PROGRAM_SECOND_ADDRESS $400
AddDefine LOADER_PROGRAM_SECOND_TRACK {FileTrack}
AddDefine LOADER_PROGRAM_SECOND_SECTOR {FileSector}
AddDefine LOADER_PROGRAM_SECOND_SIZE {FileSize}
AddDefine LOADER_PROGRAM_SECOND_SIZE_COMPRESSED {FileSizeCompressed}

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

;
; Some reserved sectors
;
ReserveSectors 6                                    ; 5 sectors

;
; The pictures
;
AddFile ..\build\files\FirstProgram.hir
AddDefine LOADER_PICTURE_FIRSTPROGRAM {FileIndex}
AddDefine LOADER_PICTURE_FIRSTPROGRAM_SIZE {FileSize}

AddFile ..\build\files\SecondProgram.hir 
AddDefine LOADER_PICTURE_SECONDPROGRAM {FileIndex}
AddDefine LOADER_PICTURE_SECONDPROGRAM_SIZE {FileSize}


