@gaialabs/iog-baserom 0.1.6 → 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,17 +1,5 @@
1
1
  
2
- !player_flags 09AE
3
- !inventory_slots 0AB4
4
- !inventory_equipped_index 0AC4
5
- !inventory_equipped_type 0AC6
6
- !VMADDL 2116
7
- !CGADD 2121
8
- !MDMAEN 420B
9
- !DMAP0 4300
10
- !A1T0L 4302
11
- !DAS0L 4305
12
-
13
-
14
- ?INCLUDE 'chunk_028000'
2
+ ?INCLUDE 'scene_script'
15
3
  --------------------------------------------
16
4
 
17
5
  item_icon_generate {
@@ -371,13 +359,13 @@ item_icon_next {
371
359
  STY $VMADDL
372
360
  LDY #$0040
373
361
  LDA #$^gfx_item_exprite
374
- JSL $@func_0283A2
362
+ JSL $@DmaWordToVram
375
363
  PLX
376
364
  LDY #$4FC0
377
365
  STY $VMADDL
378
366
  LDY #$0040
379
367
  LDA #$^gfx_item_exprite
380
- JSL $@func_0283A2
368
+ JSL $@DmaWordToVram
381
369
 
382
370
  REP #$20
383
371
  LDA #$1000
@@ -422,7 +410,7 @@ item_icon_next {
422
410
  --------------------------------------------------
423
411
  ;Allow both static sprites and temporary sprites
424
412
 
425
- func_03C78B {
413
+ func_03C78B! {
426
414
  LDX #$0000
427
415
  TXY
428
416
 
@@ -433,7 +421,7 @@ func_03C78B {
433
421
  JSR loc_03C7F0
434
422
  LDX #$0000
435
423
 
436
- loc_03C797:
424
+ loc_03C797!:
437
425
  LDA $7F3100, X
438
426
  BPL loc_03C79E
439
427
  RTS
@@ -442,11 +430,11 @@ func_03C78B {
442
430
  --------------------------------------------------------
443
431
  ;Make system sprite page loading also load item icon
444
432
 
445
- loc_03E04E {
433
+ loc_03E04E! {
446
434
  JML item_icon_stub
447
435
  }
448
436
 
449
- func_03DECD {
437
+ func_03DECD! {
450
438
  LDA $09ED
451
439
  BIT #$40
452
440
  BEQ loc_03DED5
@@ -459,27 +447,27 @@ func_03DECD {
459
447
  --------------------------------------------------------
460
448
 
461
449
  ;Aura barrier flame
462
- bundle_16C1BD [
463
- bundle < #01, &word_16C1EE, #F1, #0F, #01 > ;00
464
- bundle < #01, &word_16C1FE, #F1, #0F, #01 > ;01
465
- bundle < #01, &word_16C20E, #F1, #0F, #01 > ;02
466
- bundle < #01, &word_16C21E, #F1, #0F, #01 > ;03
467
- bundle < #01, &word_16C22E, #F1, #0F, #01 > ;04
468
- bundle < #01, &word_16C23E, #F1, #0F, #01 > ;05
469
- bundle < #01, &word_16C24E, #F1, #0F, #01 > ;06
470
- 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
471
459
  ]
472
460
 
473
461
  //Firebird
474
- bundle_16CE8F [
475
- bundle < #01, &word_16CEC0, #98, #0F, #02 > ;00
476
- bundle < #01, &word_16CED0, #98, #0F, #02 > ;01
477
- bundle < #01, &word_16CEE0, #98, #0F, #02 > ;02
478
- bundle < #01, &word_16CEF0, #98, #0F, #02 > ;03
479
- bundle < #01, &word_16CF00, #98, #0F, #02 > ;04
480
- bundle < #01, &word_16CF10, #98, #0F, #02 > ;05
481
- bundle < #01, &word_16CF20, #98, #0F, #02 > ;06
482
- 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
483
471
  ]
484
472
 
485
473
  ------------------------------------------------------
@@ -487,12 +475,12 @@ bundle_16CE8F [
487
475
  ------------------------------------------------------
488
476
  ;Enable engine flag 4000
489
477
 
490
- unk7_01805E [
491
- 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
492
480
  ]
493
481
 
494
- unk7_0181D0 [
495
- 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
496
484
  ]
497
485
 
498
486
 
@@ -533,32 +521,32 @@ code_098149- {
533
521
  ------------------------------------------------------
534
522
  ;Fix for copied palette during aura barrier
535
523
 
536
- loc_02B9C0 {
524
+ loc_02B9C0! {
537
525
  COP [50] ( @fx_palette_198090, #00, #F9, #07 ) ; <-
538
526
  COP [8E] ( #06 )
539
527
  COP [80] ( #02 )
540
528
  COP [89]
541
- COP [A5] ( @func_02C322, #00, #00, #$2400 )
529
+ COP [A5] ( @AuraBarrierPaletteFX, #00, #00, #$2400 )
542
530
  TYA
543
531
  STA $7F0012, X
544
532
  COP [84] ( #03, #02 )
545
533
  COP [8A]
546
534
  LDA #$0001
547
- TRB $player_flags
548
- COP [A5] ( @code_02BA17, #00, #F0, #$2600 )
535
+ TRB $playerFlags
536
+ COP [A5] ( @AuraOrbitalSpawner, #00, #F0, #$2600 )
549
537
  COP [84] ( #03, #0A )
550
538
  COP [8A]
551
- JSR $&sub_02C21C
539
+ JSR $&KillSpawnedProjectile
552
540
  }
553
541
 
554
542
  ;Fix for copied palette during dark friar
555
- loc_02BB77 {
543
+ loc_02BB77! {
556
544
  COP [50] ( @fx_palette_198070, #00, #F0, #10 )
557
- COP [3B] ( #4A, @func_00B519 )
545
+ COP [3B] ( #4A, @PaletteResetAndKillThinker )
558
546
  COP [48]
559
547
  AND #$0003
560
548
  STA $0000
561
- COP [D9] ( #$0000, &code_list_02BB93 )
549
+ COP [D9] ( #$0000, &DarkFriarDirTable )
562
550
  }
563
551
 
564
552
  ------------------------------------------------------
@@ -566,7 +554,7 @@ loc_02BB77 {
566
554
  ------------------------------------------------------
567
555
 
568
556
  ;Fix for copied palette during dark friar
569
- loc_02EED2 {
557
+ loc_02EED2! {
570
558
  DEC
571
559
  BNE loc_02EEF0
572
560
  LDX #$4400
@@ -574,19 +562,19 @@ loc_02EED2 {
574
562
  LDX #$&misc_fx_1CC000
575
563
  LDA #$^misc_fx_1CC000
576
564
  LDY #$0480
577
- JSL $@func_0283A2
565
+ JSL $@DmaWordToVram
578
566
  COP [50] ( @fx_palette_198070, #00, #F0, #10 )
579
567
  RTS
580
568
  }
581
569
 
582
570
  ;Fix for copied palette during aura barrier
583
- loc_02EEF0 {
571
+ loc_02EEF0! {
584
572
  LDX #$4400
585
573
  STX $VMADDL
586
574
  LDX #$&misc_fx_1CC480
587
575
  LDA #$^misc_fx_1CC480
588
576
  LDY #$0600
589
- JSL $@func_0283A2
577
+ JSL $@DmaWordToVram
590
578
  COP [50] ( @fx_palette_198090, #00, #F9, #07 )
591
579
  RTS
592
580
  }
@@ -597,7 +585,7 @@ loc_02EEF0 {
597
585
  ------------------------------------------------------
598
586
  ;Fix for sword palette during aura barrier
599
587
 
600
- sprite_group_17A483 [
588
+ sprite_group_17A483! [
601
589
  sprite_group < #13, #10, #46, #00, #F8, #F0, #01, #01, #F8, #10, #F0, #10, #0E, [
602
590
  sprite_part < #01, #0B, #08, #00, #36, #$0E4E > ;00
603
591
  sprite_part < #01, #0B, #08, #10, #26, #$0E6E > ;01
@@ -622,7 +610,7 @@ sprite_group_17A483 [
622
610
  ------------------------------------------------------
623
611
  ;Fix for prologue scene 4 to wait before generating sprites
624
612
 
625
- code_0BCE36 {
613
+ code_0BCE36! {
626
614
  LDA #$4001
627
615
  TSB $09EC
628
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
  }