@gaialabs/iog-baserom 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  
2
- ?INCLUDE 'chunk_028000'
2
+ ?INCLUDE 'scene_script'
3
3
  --------------------------------------------
4
4
 
5
5
  item_icon_generate {
@@ -359,13 +359,13 @@ item_icon_next {
359
359
  STY $VMADDL
360
360
  LDY #$0040
361
361
  LDA #$^gfx_item_exprite
362
- JSL $@func_0283A2
362
+ JSL $@DmaWordToVram
363
363
  PLX
364
364
  LDY #$4FC0
365
365
  STY $VMADDL
366
366
  LDY #$0040
367
367
  LDA #$^gfx_item_exprite
368
- JSL $@func_0283A2
368
+ JSL $@DmaWordToVram
369
369
 
370
370
  REP #$20
371
371
  LDA #$1000
@@ -410,7 +410,7 @@ item_icon_next {
410
410
  --------------------------------------------------
411
411
  ;Allow both static sprites and temporary sprites
412
412
 
413
- func_03C78B {
413
+ func_03C78B! {
414
414
  LDX #$0000
415
415
  TXY
416
416
 
@@ -421,7 +421,7 @@ func_03C78B {
421
421
  JSR loc_03C7F0
422
422
  LDX #$0000
423
423
 
424
- loc_03C797:
424
+ loc_03C797!:
425
425
  LDA $7F3100, X
426
426
  BPL loc_03C79E
427
427
  RTS
@@ -430,11 +430,11 @@ func_03C78B {
430
430
  --------------------------------------------------------
431
431
  ;Make system sprite page loading also load item icon
432
432
 
433
- loc_03E04E {
433
+ loc_03E04E! {
434
434
  JML item_icon_stub
435
435
  }
436
436
 
437
- func_03DECD {
437
+ func_03DECD! {
438
438
  LDA $09ED
439
439
  BIT #$40
440
440
  BEQ loc_03DED5
@@ -447,27 +447,27 @@ func_03DECD {
447
447
  --------------------------------------------------------
448
448
 
449
449
  ;Aura barrier flame
450
- bundle_16C1BD [
451
- bundle < #01, &word_16C1EE, #F1, #0F, #01 > ;00
452
- bundle < #01, &word_16C1FE, #F1, #0F, #01 > ;01
453
- bundle < #01, &word_16C20E, #F1, #0F, #01 > ;02
454
- bundle < #01, &word_16C21E, #F1, #0F, #01 > ;03
455
- bundle < #01, &word_16C22E, #F1, #0F, #01 > ;04
456
- bundle < #01, &word_16C23E, #F1, #0F, #01 > ;05
457
- bundle < #01, &word_16C24E, #F1, #0F, #01 > ;06
458
- bundle < #01, &word_16C25E, #F1, #0F, #01 > ;07
450
+ palette_bundle_16C1BD! [
451
+ palette-bundle < #01, &word_16C1EE, #F1, #0F, #01 > ;00
452
+ palette-bundle < #01, &word_16C1FE, #F1, #0F, #01 > ;01
453
+ palette-bundle < #01, &word_16C20E, #F1, #0F, #01 > ;02
454
+ palette-bundle < #01, &word_16C21E, #F1, #0F, #01 > ;03
455
+ palette-bundle < #01, &word_16C22E, #F1, #0F, #01 > ;04
456
+ palette-bundle < #01, &word_16C23E, #F1, #0F, #01 > ;05
457
+ palette-bundle < #01, &word_16C24E, #F1, #0F, #01 > ;06
458
+ palette-bundle < #01, &word_16C25E, #F1, #0F, #01 > ;07
459
459
  ]
460
460
 
461
461
  //Firebird
462
- bundle_16CE8F [
463
- bundle < #01, &word_16CEC0, #98, #0F, #02 > ;00
464
- bundle < #01, &word_16CED0, #98, #0F, #02 > ;01
465
- bundle < #01, &word_16CEE0, #98, #0F, #02 > ;02
466
- bundle < #01, &word_16CEF0, #98, #0F, #02 > ;03
467
- bundle < #01, &word_16CF00, #98, #0F, #02 > ;04
468
- bundle < #01, &word_16CF10, #98, #0F, #02 > ;05
469
- bundle < #01, &word_16CF20, #98, #0F, #02 > ;06
470
- bundle < #01, &word_16CF30, #98, #0F, #02 > ;07
462
+ palette_bundle_16CE8F! [
463
+ palette-bundle < #01, &word_16CEC0, #98, #0F, #02 > ;00
464
+ palette-bundle < #01, &word_16CED0, #98, #0F, #02 > ;01
465
+ palette-bundle < #01, &word_16CEE0, #98, #0F, #02 > ;02
466
+ palette-bundle < #01, &word_16CEF0, #98, #0F, #02 > ;03
467
+ palette-bundle < #01, &word_16CF00, #98, #0F, #02 > ;04
468
+ palette-bundle < #01, &word_16CF10, #98, #0F, #02 > ;05
469
+ palette-bundle < #01, &word_16CF20, #98, #0F, #02 > ;06
470
+ palette-bundle < #01, &word_16CF30, #98, #0F, #02 > ;07
471
471
  ]
472
472
 
473
473
  ------------------------------------------------------
@@ -475,12 +475,12 @@ bundle_16CE8F [
475
475
  ------------------------------------------------------
476
476
  ;Enable engine flag 4000
477
477
 
478
- unk7_01805E [
479
- unk7 < #17, #00, #80, #00, #24, #85, #09, #80, #00, #00 > ;Statue reward scene
478
+ display_preset_01805E! [
479
+ display-preset < #17, #00, #80, #00, #24, #85, #09, #80, #00, #00 > ;Statue reward scene
480
480
  ]
481
481
 
482
- unk7_0181D0 [
483
- unk7 < #17, #00, #80, #03, #E4, #80, #09, #80, #00, #00 > ;Epilogue scene
482
+ display_preset_0181D0! [
483
+ display-preset < #17, #00, #80, #03, #E4, #80, #09, #80, #00, #00 > ;Epilogue scene
484
484
  ]
485
485
 
486
486
 
@@ -521,32 +521,32 @@ code_098149- {
521
521
  ------------------------------------------------------
522
522
  ;Fix for copied palette during aura barrier
523
523
 
524
- loc_02B9C0 {
524
+ loc_02B9C0! {
525
525
  COP [50] ( @fx_palette_198090, #00, #F9, #07 ) ; <-
526
526
  COP [8E] ( #06 )
527
527
  COP [80] ( #02 )
528
528
  COP [89]
529
- COP [A5] ( @func_02C322, #00, #00, #$2400 )
529
+ COP [A5] ( @AuraBarrierPaletteFX, #00, #00, #$2400 )
530
530
  TYA
531
531
  STA $7F0012, X
532
532
  COP [84] ( #03, #02 )
533
533
  COP [8A]
534
534
  LDA #$0001
535
- TRB $player_flags
536
- COP [A5] ( @code_02BA17, #00, #F0, #$2600 )
535
+ TRB $playerFlags
536
+ COP [A5] ( @AuraOrbitalSpawner, #00, #F0, #$2600 )
537
537
  COP [84] ( #03, #0A )
538
538
  COP [8A]
539
- JSR $&sub_02C21C
539
+ JSR $&KillSpawnedProjectile
540
540
  }
541
541
 
542
542
  ;Fix for copied palette during dark friar
543
- loc_02BB77 {
543
+ loc_02BB77! {
544
544
  COP [50] ( @fx_palette_198070, #00, #F0, #10 )
545
- COP [3B] ( #4A, @func_00B519 )
545
+ COP [3B] ( #4A, @PaletteResetAndKillThinker )
546
546
  COP [48]
547
547
  AND #$0003
548
548
  STA $0000
549
- COP [D9] ( #$0000, &code_list_02BB93 )
549
+ COP [D9] ( #$0000, &DarkFriarDirTable )
550
550
  }
551
551
 
552
552
  ------------------------------------------------------
@@ -554,7 +554,7 @@ loc_02BB77 {
554
554
  ------------------------------------------------------
555
555
 
556
556
  ;Fix for copied palette during dark friar
557
- loc_02EED2 {
557
+ loc_02EED2! {
558
558
  DEC
559
559
  BNE loc_02EEF0
560
560
  LDX #$4400
@@ -562,19 +562,19 @@ loc_02EED2 {
562
562
  LDX #$&misc_fx_1CC000
563
563
  LDA #$^misc_fx_1CC000
564
564
  LDY #$0480
565
- JSL $@func_0283A2
565
+ JSL $@DmaWordToVram
566
566
  COP [50] ( @fx_palette_198070, #00, #F0, #10 )
567
567
  RTS
568
568
  }
569
569
 
570
570
  ;Fix for copied palette during aura barrier
571
- loc_02EEF0 {
571
+ loc_02EEF0! {
572
572
  LDX #$4400
573
573
  STX $VMADDL
574
574
  LDX #$&misc_fx_1CC480
575
575
  LDA #$^misc_fx_1CC480
576
576
  LDY #$0600
577
- JSL $@func_0283A2
577
+ JSL $@DmaWordToVram
578
578
  COP [50] ( @fx_palette_198090, #00, #F9, #07 )
579
579
  RTS
580
580
  }
@@ -585,7 +585,7 @@ loc_02EEF0 {
585
585
  ------------------------------------------------------
586
586
  ;Fix for sword palette during aura barrier
587
587
 
588
- sprite_group_17A483 [
588
+ sprite_group_17A483! [
589
589
  sprite_group < #13, #10, #46, #00, #F8, #F0, #01, #01, #F8, #10, #F0, #10, #0E, [
590
590
  sprite_part < #01, #0B, #08, #00, #36, #$0E4E > ;00
591
591
  sprite_part < #01, #0B, #08, #10, #26, #$0E6E > ;01
@@ -610,7 +610,7 @@ sprite_group_17A483 [
610
610
  ------------------------------------------------------
611
611
  ;Fix for prologue scene 4 to wait before generating sprites
612
612
 
613
- code_0BCE36 {
613
+ code_0BCE36! {
614
614
  LDA #$4001
615
615
  TSB $09EC
616
616
  COP [50] ( @pal_prologue_mishap, #00, #00, #20 )
@@ -11,17 +11,17 @@
11
11
  LDY #$4200
12
12
  STY $VMADDL
13
13
  LDY #$1C00
14
- JSL $@func_0283A2
14
+ JSL $@DmaWordToVram
15
15
  PLP
16
16
  RTL
17
17
 
18
18
  ------------------------------------------------
19
- ?INCLUDE 'chunk_028000'
19
+ ?INCLUDE 'scene_script'
20
20
  ?INCLUDE 'chunk_03BAE1'
21
21
  ------------------------------------------------
22
22
  ;Load special sprite asset for boot scene
23
23
 
24
- func_03DFF8 {
24
+ func_03DFF8! {
25
25
  PHP
26
26
  LDA $scene_current
27
27
  CMP #$F7
@@ -45,7 +45,7 @@ func_03DFF8 {
45
45
  LDX #$&gfx_000000
46
46
  LDA #$^gfx_000000
47
47
  LDY #$1C00
48
- JSL $@func_0283A2
48
+ JSL $@DmaWordToVram
49
49
  LDA $player_flags
50
50
  BIT #$08
51
51
  BEQ loc_03E035
@@ -54,7 +54,7 @@ func_03DFF8 {
54
54
  LDX #$&misc_fx_1CD580
55
55
  LDA #$^misc_fx_1CD580
56
56
  LDY #$0800
57
- JSL $@func_0283A2
57
+ JSL $@DmaWordToVram
58
58
  BRA loc_03E04E
59
59
 
60
60
  load_fb_asset:
@@ -49,12 +49,12 @@ generate_number_sprites {
49
49
  ASL
50
50
  ASL
51
51
  TAX
52
- LDA @unk10_02EB86, X
52
+ LDA @SlotPositionTable, X
53
53
  CLC
54
54
  ADC #$num_xoffset
55
55
  STA $25
56
56
 
57
- LDA @unk10_02EB86+2, X
57
+ LDA @SlotPositionTable+2, X
58
58
  CLC
59
59
  ADC #$num_yoffset
60
60
  STA $26
@@ -123,7 +123,7 @@ push_number_sprite {
123
123
  ?INCLUDE 'system_strings'
124
124
  ---------------------------------------------
125
125
 
126
- code_02E399 {
126
+ InventoryMenuInit! {
127
127
  COP [88] ( @inventory_spritemap )
128
128
  COP [BD] ( @asciistring_01E869 )
129
129
  LDA #$1000
@@ -134,7 +134,7 @@ code_02E399 {
134
134
  STA $24
135
135
  }
136
136
 
137
- loc_02E63D {
137
+ loc_02E63D! {
138
138
  JSR generate_number_sprites
139
139
  PHX
140
140
  PHD
@@ -147,14 +147,14 @@ loc_02E63D {
147
147
  JMP $&code_02E544
148
148
  }
149
149
 
150
- loc_02E6FC {
150
+ loc_02E6FC! {
151
151
  JSR generate_number_sprites
152
152
  COP [06] ( #13 )
153
153
  JMP $&code_02E66B
154
154
  }
155
155
 
156
156
  ;Enable direct sprites
157
- loc_02EB22 {
157
+ loc_02EB22! {
158
158
  LDA #$1000
159
159
  TSB $06EE
160
160
 
@@ -167,7 +167,7 @@ loc_02EB22 {
167
167
  }
168
168
 
169
169
  ;Disable direct sprites for status menu
170
- loc_02EB4D {
170
+ loc_02EB4D! {
171
171
  LDA #$1000
172
172
  TRB $06EE
173
173
 
@@ -183,11 +183,11 @@ loc_02EB4D {
183
183
  ---------------------------------------------
184
184
  ;Cursor positions
185
185
 
186
- unk10_02EAB0 [
187
- unk10 < #$004E, #$0030 > ;00
188
- unk10 < #$0066, #$0030 > ;01
189
- unk10 < #$007E, #$0030 > ;02
190
- unk10 < #$0096, #$0030 > ;03
186
+ GridColumnPositions! [
187
+ screen-pos < #$004E, #$0030 > ;00
188
+ screen-pos < #$0066, #$0030 > ;01
189
+ screen-pos < #$007E, #$0030 > ;02
190
+ screen-pos < #$0096, #$0030 > ;03
191
191
  ]
192
192
 
193
193
  ------------------------------------------------
@@ -195,7 +195,7 @@ unk10_02EAB0 [
195
195
  ------------------------------------------------
196
196
  ;H-Mirror on the cursor
197
197
 
198
- sprite_group_108BAA [
198
+ sprite_group_108BAA! [
199
199
  sprite_group < #01, #0F, #18, #00, #F8, #F0, #01, #01, #F8, #10, #F0, #10, #01, [
200
200
  sprite_part < #01, #00, #00, #00, #08, #$46E5 >
201
201
  ] >
@@ -206,7 +206,7 @@ sprite_group_108BAA [
206
206
  ------------------------------------------------
207
207
  ;Enable static sprites for scene FF with a different address and size
208
208
 
209
- loc_03C7F6 {
209
+ loc_03C7F6! {
210
210
  LDA $scene_current
211
211
  CMP #$00FF
212
212
  BNE direct_sprite_large
@@ -242,7 +242,7 @@ loc_03C7F6 {
242
242
  }
243
243
 
244
244
 
245
- loc_03C807 {
245
+ loc_03C807! {
246
246
  DEC
247
247
  PHB
248
248
  MVN #$00, #$7F
@@ -263,7 +263,7 @@ loc_03C807 {
263
263
 
264
264
  SEP #$20
265
265
 
266
- loc_03C821:
266
+ loc_03C821!:
267
267
  DEC $0E
268
268
  BMI loc_03C82D
269
269
  LDA $01, S
@@ -273,7 +273,7 @@ loc_03C807 {
273
273
  }
274
274
 
275
275
 
276
- loc_03C82D {
276
+ loc_03C82D! {
277
277
  LDA $01, S
278
278
  BEQ small_sprite_process
279
279
  LDA $@binary_03C841, X
@@ -125,7 +125,7 @@ inv_check_pages {
125
125
 
126
126
  ------------------------------------------------
127
127
  ;Entry point for gem use (prevent increase, this is done elsewhere)
128
- func_0384D5 {
128
+ func_0384D5! {
129
129
  COP [BF] ( &widestring_038517 )
130
130
  JSR $&sub_039FB2
131
131
 
@@ -160,7 +160,7 @@ func_0384D5 {
160
160
  ---------------------------------------------
161
161
  ;Entry point for removing an item from the inventory upon use
162
162
 
163
- sub_039FB2 {
163
+ sub_039FB2! {
164
164
  PHX
165
165
  LDX $inventory_equipped_index
166
166
  JSR inv_remove_stub
@@ -172,7 +172,7 @@ sub_039FB2 {
172
172
  --------------------------------------------------
173
173
  ;Entry point for adding an item to the inventory
174
174
 
175
- func_03EF97 {
175
+ func_03EF97! {
176
176
  PHP
177
177
  SEP #$20
178
178
  BIT #$80
@@ -227,7 +227,7 @@ func_03EF97 {
227
227
  ---------------------------------------------
228
228
  ;Entry point for checking inventory for item
229
229
 
230
- loc_03F0B9 {
230
+ loc_03F0B9! {
231
231
  CMP $inventory_slots, Y
232
232
  BEQ loc_03F0C7
233
233
  INY
@@ -250,7 +250,7 @@ loc_03F0B9 {
250
250
  ---------------------------------------------
251
251
  ;Route COP item removal through common process
252
252
 
253
- loc_03F0A0 {
253
+ loc_03F0A0! {
254
254
  PHX
255
255
  TYX
256
256
  JSR inv_remove_stub
@@ -261,7 +261,7 @@ loc_03F0A0 {
261
261
  -----------------------------------------
262
262
  ;Entry point for giving Jewels to Gem
263
263
 
264
- code_08CF68 {
264
+ code_08CF68! {
265
265
  SEP #$20
266
266
  LDA #$00
267
267
  XBA
@@ -317,8 +317,8 @@ code_08CF68 {
317
317
  REP #$20
318
318
  }
319
319
 
320
- loc_08CF74 {
320
+ loc_08CF74! {
321
321
  }
322
322
 
323
- loc_08CF84 {
323
+ loc_08CF84! {
324
324
  }
@@ -2,7 +2,7 @@
2
2
  ?INCLUDE 'chunk_03BAE1'
3
3
 
4
4
 
5
- loc_03CEEC:
5
+ loc_03CEEC!:
6
6
  LDX $0646
7
7
  LDA $@scene_actors_extract_table, X
8
8
  DEC
@@ -1,17 +1,17 @@
1
1
  ?BANK 02
2
2
 
3
- ?INCLUDE 'chunk_028000'
3
+ ?INCLUDE 'scene_script'
4
4
 
5
5
  !SPTR $3E
6
6
 
7
7
  -----------------------------------------------------
8
8
 
9
- func_028C30 {
9
+ SceneCmd_LoadCharTiles! {
10
10
  PHP
11
- JSR $&sub_028CE7
11
+ JSR $&ReadScriptByte
12
12
  STA $066A
13
13
  LDX #$003E
14
- JSR $&sub_028D8F
14
+ JSR $&LoadScriptPointer
15
15
  REP #$20
16
16
  LDA [$3E]
17
17
  STA $00
@@ -23,7 +23,7 @@ func_028C30 {
23
23
  INC $3E
24
24
  INC $3E
25
25
  SEP #$20
26
- JSL $@func_0281D1
26
+ JSL $@SignedMultiply
27
27
  REP #$20
28
28
  STA $00
29
29
  XBA
@@ -41,7 +41,7 @@ func_028C30 {
41
41
  SEP #$20
42
42
  LDX #$7000
43
43
  STX $7A
44
- JSL $@func_028270
44
+ JSL $@QuintetLzDecompress
45
45
  LDX #$7000
46
46
  STX $3E
47
47
  LDA #$7E
@@ -49,6 +49,6 @@ func_028C30 {
49
49
  BRA loc_028C87
50
50
  }
51
51
 
52
- loc_028C81 {
52
+ loc_028C81! {
53
53
  SEP #$20
54
54
  }