• R/O
  • SSH
  • HTTPS

oricsdk: Commit


Commit MetaInfo

Revision1572 (tree)
Time2021-08-14 19:06:51
Authordbug

Log Message

Updated the Global Game Jam 2015 (Weekend in Oslo) project to use the latest OSDK (1.19)

Change Summary

Incremental Difference

--- users/dbug/games/GlobalGameJam2015/code/floppybuilderscript.txt (revision 1571)
+++ users/dbug/games/GlobalGameJam2015/code/floppybuilderscript.txt (revision 1572)
@@ -15,6 +15,8 @@
1515 ; - Support for file compression in the tool
1616 ; - Possibility to do partial loads, saves, depacking in realtime
1717 ;
18+FormatVersion 0.20
19+
1820 ;LoadDiskTemplate default.dsk
1921 DefineDisk 2 42 17 ; 2 sides, 42 tracks, 17 sectors
2022
@@ -23,6 +25,8 @@
2325
2426 ;AddDefine LOADER_SHOW_DEBUGINFO 1
2527 ;AddDefine ENABLE_TIMING_DEBUGGING 1
28+AddDefine LOADER_SECTOR_BUFFER $200
29+AddDefine LOADER_BASE_ZERO_PAGE $00
2630
2731 ;
2832 ; This defines the bootsectors to use for the various operating systems
@@ -42,7 +46,7 @@
4246 ; Now here is the loader code, that one is Microdisc only
4347 ;
4448 SetPosition 0 4
45-AddFile ..\build\files\loader.o $fc00 ; Sector 4
49+WriteLoader ..\build\files\loader.o $fe00 ; Sector 4
4650
4751 ;
4852 ; From now on we compress data (The loader should not be compressed)
@@ -52,50 +56,55 @@
5256 ;
5357 ; Then the files used in the demo
5458 ;
55-AddDefine LOADER_SLIDESHOW {FileIndex}
56-AddFile ..\build\files\game.o $c000 ; The main application
59+AddFile ..\build\files\game.o ; The main application
60+AddDefine LOADER_GAME_PROGRAM {FileIndex}
61+AddDefine LOADER_GAME_PROGRAM_ADDRESS $c000
62+AddDefine LOADER_GAME_PROGRAM_TRACK {FileTrack}
63+AddDefine LOADER_GAME_PROGRAM_SECTOR {FileSector}
64+AddDefine LOADER_GAME_PROGRAM_SIZE {FileSize}
65+AddDefine LOADER_GAME_PROGRAM_SIZE_COMPRESSED {FileSizeCompressed}
5766
5867 ;
5968 ; The fonts
6069 ;
70+AddFile ..\build\files\Font6x8.hir ; 9900=STD, 9D00=ALT
6171 AddDefine LOADER_FONT_6x8 {FileIndex}
62-AddFile ..\build\files\Font6x8.hir $9900 ; 9900=STD, 9D00=ALT
6372
73+AddFile ..\build\files\Font6x6.hir
6474 AddDefine LOADER_FONT_6x6 {FileIndex}
65-AddFile ..\build\files\Font6x6.hir $a000
6675
6776 ;
6877 ; The pictures
6978 ;
79+AddFile ..\build\files\funcom_logo_240x200.hir ; The 240x200 funcom logo
7080 AddDefine LOADER_FUNCOM_LOGO {FileIndex}
71-AddFile ..\build\files\funcom_logo_240x200.hir $a000 ; The 240x200 funcom logo
7281
82+AddFile ..\build\files\GlobalGameJamOslo.hir ; The 240x200 Global Game Jam Oslo logo
7383 AddDefine LOADER_GAMEJAM_LOGO {FileIndex}
74-AddFile ..\build\files\GlobalGameJamOslo.hir $a000 ; The 240x200 Global Game Jam Oslo logo
7584
85+AddFile ..\build\files\valp_outline.hir ; The 240x200 Volvo Valp outline picture
7686 AddDefine LOADER_VALP_OUTLINE {FileIndex}
77-AddFile ..\build\files\valp_outline.hir $a000 ; The 240x200 Volvo Valp outline picture
7887
88+AddFile ..\build\files\oslo_map.hir [description:Where do you want to go now?] [name:Map of Oslo]
7989 AddDefine LOADER_OSLO_MAP {FileIndex}
80-AddFile ..\build\files\oslo_map.hir $a000 [description:Where do you want to go now?] [name:Map of Oslo]
8190
91+AddFile ..\build\files\title_screen.hir
8292 AddDefine LOADER_TITLE_SCREEN {FileIndex}
83-AddFile ..\build\files\title_screen.hir $a000
8493
94+AddFile ..\build\files\ending_giveup.hir
8595 AddDefine LOADER_ENDING_GIVEUP {FileIndex}
86-AddFile ..\build\files\ending_giveup.hir $a000
8796
97+AddFile ..\build\files\ending_out_of_money.hir
8898 AddDefine LOADER_ENDING_OUT_OF_MONEY {FileIndex}
89-AddFile ..\build\files\ending_out_of_money.hir $a000
9099
100+AddFile ..\build\files\ending_out_of_time.hir
91101 AddDefine LOADER_ENDING_OUT_OF_TIME {FileIndex}
92-AddFile ..\build\files\ending_out_of_time.hir $a000
93102
103+AddFile ..\build\files\ending_victory.hir
94104 AddDefine LOADER_ENDING_VICTORY {FileIndex}
95-AddFile ..\build\files\ending_victory.hir $a000
96105
106+AddFile ..\build\files\how_to_play.hir
97107 AddDefine LOADER_HOW_TO_PLAY {FileIndex}
98-AddFile ..\build\files\how_to_play.hir $a000
99108
100109
101110
@@ -103,52 +112,52 @@
103112 ;
104113 ; Locations, 174x180 pictures
105114 ;
115+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]
106116 AddDefine LOADER_LOCATION_FIRST {FileIndex}
107117
108118 AddDefine LOADER_LOCATION_VIGELAND {FileIndex}
109-AddFile ..\build\files\location_vigeland.hir $a000 [description:The Vigeland Park is the worlds largestsculpture park made by a single artist one of Norway most popular attractions] [name:Vigeland Park]
110119
120+AddFile ..\build\files\location_opera.hir [description:The Opera is a weirdly shaped thing in the Oslo harbor] [name:Oslo Opera]
111121 AddDefine LOADER_LOCATION_OPERA {FileIndex}
112-AddFile ..\build\files\location_opera.hir $a000 [description:The Opera is a weirdly shaped thing in the Oslo harbor] [name:Oslo Opera]
113122
123+AddFile ..\build\files\location_holmenkolen.hir [description:See the famous ski jump] [name:Holmenkolen]
114124 AddDefine LOADER_LOCATION_HOLMENKOLEN {FileIndex}
115-AddFile ..\build\files\location_holmenkolen.hir $a000 [description:See the famous ski jump] [name:Holmenkolen]
116125
126+AddFile ..\build\files\location_jernbanetorget.hir [description:The Oslo train station is really the city hub] [name:Oslo Sentralstajon]
117127 AddDefine LOADER_LOCATION_OSLOS {FileIndex}
118-AddFile ..\build\files\location_jernbanetorget.hir $a000 [description:The Oslo train station is really the city hub] [name:Oslo Sentralstajon]
119128
129+AddFile ..\build\files\location_akerbrygge.hir [description:Boats, shopping malls, and expensive restaurants] [name:Aker Brygge]
120130 AddDefine LOADER_LOCATION_AKERBRYGGE {FileIndex}
121-AddFile ..\build\files\location_akerbrygge.hir $a000 [description:Boats, shopping malls, and expensive restaurants] [name:Aker Brygge]
122131
132+AddFile ..\build\files\location_kingscastle.hir [description:Where the royal familly lives] [name:The Royal Palace]
123133 AddDefine LOADER_LOCATION_KINGCASTLE {FileIndex}
124-AddFile ..\build\files\location_kingscastle.hir $a000 [description:Where the royal familly lives] [name:The Royal Palace]
125134
135+AddFile ..\build\files\location_sognsvann.hir [description:A nice lake, you can swim and take a walk] [name:Sognsvann]
126136 AddDefine LOADER_LOCATION_SOGNSVANN {FileIndex}
127-AddFile ..\build\files\location_sognsvann.hir $a000 [description:A nice lake, you can swim and take a walk] [name:Sognsvann]
128137
138+AddFile ..\build\files\location_vikingship_museum.hir [description:Hosts three nice viking ships] [name:Viking Ship Museum]
129139 AddDefine LOADER_LOCATION_VIKINGSHIP {FileIndex}
130-AddFile ..\build\files\location_vikingship_museum.hir $a000 [description:Hosts three nice viking ships] [name:Viking Ship Museum]
131140
141+AddFile ..\build\files\location_munch_museum.hir [description:The Scream is there, among many other paintings] [name:Munch Museum]
132142 AddDefine LOADER_LOCATION_MUNCHMUSEUM {FileIndex}
133-AddFile ..\build\files\location_munch_museum.hir $a000 [description:The Scream is there, among many other paintings] [name:Munch Museum]
134143
144+AddFile ..\build\files\location_ibsen_museum.hir [description:Ibsen, famous Norwegian writter] [name:Ibsen Museum]
135145 AddDefine LOADER_LOCATION_IBSENMUSEUM {FileIndex}
136-AddFile ..\build\files\location_ibsen_museum.hir $a000 [description:Ibsen, famous Norwegian writter] [name:Ibsen Museum]
137146
147+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]
138148 AddDefine LOADER_LOCATION_NORWEGIANFOLK {FileIndex}
139-AddFile ..\build\files\location_norwegian_folk_museum.hir $a000 [description:Many interesting things to see there, including a beautiful stave church builtin the early 13th century] [name:Norwegian Folk Museum]
140149
150+AddFile ..\build\files\location_kon_tiki_museum.hir [description:Learn about Thor Heyerdahl's expedition] [name:Kon-Tiki museum]
141151 AddDefine LOADER_LOCATION_KONTIKI {FileIndex}
142-AddFile ..\build\files\location_kon_tiki_museum.hir $a000 [description:Learn about Thor Heyerdahl's expedition] [name:Kon-Tiki museum]
143152
153+AddFile ..\build\files\location_akershus_fortress.hir [description:The Oslo fortress, protecting from invaders comming by boat] [name:Akershus Fortress]
144154 AddDefine LOADER_LOCATION_AKERSHUS {FileIndex}
145-AddFile ..\build\files\location_akershus_fortress.hir $a000 [description:The Oslo fortress, protecting from invaders comming by boat] [name:Akershus Fortress]
146155
156+AddFile ..\build\files\location_national_gallery.hir [description:The other place where you can see the Scream. For free] [name:National Gallery]
147157 AddDefine LOADER_LOCATION_NATIONALGALLERY {FileIndex}
148-AddFile ..\build\files\location_national_gallery.hir $a000 [description:The other place where you can see the Scream. For free] [name:National Gallery]
149158
159+AddFile ..\build\files\location_natural_history_museum.hir [description:Dinosaurs and old stuff :)] [name:Natural History Museum]
150160 AddDefine LOADER_LOCATION_NATURALHISTORY {FileIndex}
151-AddFile ..\build\files\location_natural_history_museum.hir $a000 [description:Dinosaurs and old stuff :)] [name:Natural History Museum]
152161
153162
154163 AddDefine LOADER_LOCATION_LAST {FileIndex}
@@ -159,5 +168,5 @@
159168 ;
160169 ; Audio
161170 ;
171+AddFile ..\build\files\FuncomJingle.raw ; The funcom jingle
162172 AddDefine LOADER_FUNCOM_JINGLE {FileIndex}
163-AddFile ..\build\files\FuncomJingle.raw $400 ; The funcom jingle
--- users/dbug/games/GlobalGameJam2015/code/loader_api.h (revision 1571)
+++ users/dbug/games/GlobalGameJam2015/code/loader_api.h (revision 1572)
@@ -5,9 +5,7 @@
55 #include "floppy_description.h"
66
77 #ifdef ASSEMBLER // 6502 Assembler API
8-#define SetFileAddress(fileIndex,address) ldx #fileIndex:lda #<address:ldy #>address:jsr $fff4
9-#define LoadFile(fileIndex) ldx #fileIndex:jsr $fff7
10-#define LoadFileAt(fileIndex,address) ldx #fileIndex:lda #<address:ldy #>address:jsr $fff4:jsr $fff7
8+#define LoadFileAt(fileIndex,address) lda #fileIndex:sta _LoaderApiEntryIndex:lda #<address:sta _LoaderApiAddressLow:lda #>address:sta _LoaderApiAddressHigh:jsr _LoadApiLoadFileFromDirectory
119
1210 #else // C Compiler API
1311 extern unsigned char LoaderApiEntryIndex;
@@ -15,11 +13,6 @@
1513 extern unsigned char LoaderApiAddressHigh;
1614 extern void* LoaderApiAddress;
1715
18-extern void SetLoadAddress();
19-extern void LoadFile();
16+#define LoadFileAt(fileIndex,address) LoaderApiEntryIndex=fileIndex;LoaderApiAddress=(void*)address;LoadApiLoadFileFromDirectory();
2017
21-#define SetFileAddress(fileIndex,address) LoaderApiEntryIndex=fileIndex;LoaderApiAddress=address;LoaderApiSetLoadAddress();
22-#define LoadFile(fileIndex) LoaderApiEntryIndex=fileIndex;LoaderApiLoadFile();
23-#define LoadFileAt(fileIndex,address) LoaderApiEntryIndex=fileIndex;LoaderApiAddress=(void*)address;LoaderApiSetLoadAddress();LoaderApiLoadFile();
24-
2518 #endif
--- users/dbug/games/GlobalGameJam2015/code/loader_api.s (revision 1571)
+++ users/dbug/games/GlobalGameJam2015/code/loader_api.s (revision 1572)
@@ -2,30 +2,53 @@
22 ; Small code to implement the loading of data while a program is running.
33 ; What it does is to call the loader module, it abstracts the actual loader implementation
44 ;
5- .text
5+ .bss
66
7-_LoaderApiEntryIndex .byt 0
7+ *=$FFEF
88
9+_LoaderApiFileStartSector .byt 0 ; $FFEF
10+_LoaderApiFileStartTrack .byt 0 ; $FFF0
11+
12+_LoaderApiFileSize
13+_LoaderApiFileSizeLow .byt 0 ; $FFF1
14+_LoaderApiFileSizeHigh .byt 0 ; $FFF2
15+
16+_LoaderApiJump .byt $4c ; $FFF3
917 _LoaderApiAddress
10-_LoaderApiAddressLow .byt 0
11-_LoaderApiAddressHigh .byt 0
18+_LoaderApiAddressLow .byt 0 ; $FFF4
19+_LoaderApiAddressHigh .byt 0 ; $FFF5
1220
13-_LoaderApiLoadFile
14- ldx _LoaderApiEntryIndex
15-_LoaderApiLoadFileRegister
16- jmp $fff7 ; _LoadFile
21+_LoaderFDCRegisterOffset .byt 0 ; $FFF6
1722
18-_LoaderApiSetLoadAddress
19- lda _LoaderApiAddressLow
20- ldy _LoaderApiAddressHigh
23+_LoaderApiLoadFile .byt $4c,0,0 ; $FFF7-$FFF9
24+
25+ .text
26+
27+;
28+; Include the directory information from the floppy builder generated file
29+;
30+#define ASSEMBLER
31+#define LOADER ; We request the actual table data to be included in the file
32+#include "floppy_description.h" ; This file is generated by the floppy builder
33+
34+_LoaderApiEntryIndex .byt 0
35+
36+; Assumes that _LoaderApiEntryIndex contains a valid value (temp)
37+; As well as _LoaderApiAddress
38+; It fills the rest
39+_LoadApiLoadFileFromDirectory
2140 ldx _LoaderApiEntryIndex
22-_LoaderApiSetLoadAddressRegister
23- jmp $fff4 ; SetLoadAddress
2441
42+ lda FileStartSector,x
43+ sta _LoaderApiFileStartSector
2544
26-; x: file index
27-; a: Low part of address
28-; y: High part of address
29-_LoaderApiLoadFileAtAddressRegister
30- jsr $fff4 ; SetLoadAddress
31- jmp $fff7 ; _LoadFile
45+ lda FileStartTrack,x
46+ sta _LoaderApiFileStartTrack
47+
48+ lda FileSizeLow,x
49+ sta _LoaderApiFileSizeLow
50+
51+ lda FileSizeHigh,x
52+ sta _LoaderApiFileSizeHigh
53+
54+ jmp _LoaderApiLoadFile
Show on old repository browser