-
Notifications
You must be signed in to change notification settings - Fork 2
/
baserom.asm
29777 lines (26698 loc) · 746 KB
/
baserom.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; This disassembly was created using Emulicious (http://www.emulicious.net)
.MEMORYMAP
SLOTSIZE $7FF0
SLOT 0 $0000
SLOTSIZE $10
SLOT 1 $7FF0
SLOTSIZE $4000
SLOT 2 $8000
DEFAULTSLOT 2
.ENDME
.ROMBANKMAP
BANKSTOTAL 8
BANKSIZE $7FF0
BANKS 1
BANKSIZE $10
BANKS 1
BANKSIZE $4000
BANKS 6
.ENDRO
.enum $C000 export
_RAM_C000_ dsb $4
_RAM_C004_ db
_RAM_C005_ db
_RAM_C006_ db
_RAM_C007_ db
_RAM_C008_ db
_RAM_C009_ dw
.ende
.enum $C00E export
_RAM_C00E_ dw
.ende
.enum $C011 export
_RAM_C011_ db
.ende
.enum $C014 export
_RAM_C014_ db
_RAM_C015_ db
_RAM_C016_ db
.ende
.enum $C01F export
_RAM_C01F_ db
_RAM_C020_ dsb $3
_RAM_C023_ dw
_RAM_C025_ db
.ende
.enum $C030 export
_RAM_C030_ db
_RAM_C031_ db
.ende
.enum $C038 export
_RAM_C038_ dw
_RAM_C03A_ dw
_RAM_C03C_ db
_RAM_C03D_ db
_RAM_C03E_ db
_RAM_C03F_ db
.ende
.enum $C046 export
_RAM_C046_ db
_RAM_C047_ db
_RAM_C048_ db
_RAM_C049_ db
_RAM_C04A_ db
_RAM_C04B_ db
_RAM_C04C_ db
_RAM_C04D_ db
_RAM_C04E_ db
_RAM_C04F_ db
.ende
.enum $C051 export
_RAM_C051_ db
.ende
.enum $C053 export
_RAM_C053_ db
_RAM_C054_ db
_RAM_C055_ db
_RAM_C056_ db
_RAM_C057_ db
_RAM_C058_ dw
_RAM_C05A_ dw
_RAM_C05C_ db
_RAM_C05D_ db
.ende
.enum $C05F export
_RAM_C05F_ db
.ende
.enum $C061 export
_RAM_C061_ dw
_RAM_C063_ db
_RAM_C064_ db
_RAM_C065_ db
_RAM_C066_ db
_RAM_C067_ db
.ende
.enum $C069 export
_RAM_C069_ db
_RAM_C06A_ dw
_RAM_C06C_ db
_RAM_C06D_ dw
_RAM_C06F_ db
_RAM_C070_ dw
_RAM_C072_ dw
_RAM_C074_ dw
_RAM_C076_ db
_RAM_C077_ db
_RAM_C078_ dw
_RAM_C07A_ dw
_RAM_C07C_ db
_RAM_C07D_ db
_RAM_C07E_ db
_RAM_C07F_ db
_RAM_C080_ db
_RAM_C081_ db
.ende
.enum $C085 export
_RAM_C085_ dw
_RAM_C087_ dw
_RAM_C089_ dw
.ende
.enum $C08D export
_RAM_C08D_ db
_RAM_C08E_ db
_RAM_C08F_ db
_RAM_C090_ db
_RAM_C091_ db
_RAM_C092_ db
_RAM_C093_ db
_RAM_C094_ db
_RAM_C095_ db
_RAM_C096_ db
.ende
.enum $C0A0 export
_RAM_C0A0_ db
_RAM_C0A1_ db
.ende
.enum $C0A3 export
_RAM_C0A3_ dw
_RAM_C0A5_ db
_RAM_C0A6_ db
.ende
.enum $C0A8 export
_RAM_C0A8_ dw
_RAM_C0AA_ db
_RAM_C0AB_ db
_RAM_C0AC_ db
_RAM_C0AD_ db
_RAM_C0AE_ db
_RAM_C0AF_ db
_RAM_C0B0_ dw
.ende
.enum $C0B3 export
_RAM_C0B3_ db
_RAM_C0B4_ db
_RAM_C0B5_ db
_RAM_C0B6_ db
_RAM_C0B7_ dw
_RAM_C0B9_ db
_RAM_C0BA_ db
_RAM_C0BB_ db
_RAM_C0BC_ db
_RAM_C0BD_ db
_RAM_C0BE_ dw
.ende
.enum $C0C1 export
_RAM_C0C1_ db
_RAM_C0C2_ db
_RAM_C0C3_ db
_RAM_C0C4_ db
_RAM_C0C5_ dw
.ende
.enum $C0C9 export
_RAM_C0C9_ db
_RAM_C0CA_ dsb $2a
_RAM_C0F4_ dw
.ende
.enum $C0F8 export
_RAM_C0F8_ db
_RAM_C0F9_ dw
_RAM_C0FB_ db
.ende
.enum $C0FD export
_RAM_C0FD_ dw
_RAM_C0FF_ db
_RAM_C100_ db
.ende
.enum $C103 export
_RAM_C103_ dw
_RAM_C105_ dw
_RAM_C107_ dw
.ende
.enum $C10A export
_RAM_C10A_ db
_RAM_C10B_ db
.ende
.enum $C10D export
_RAM_C10D_ db
.ende
.enum $C110 export
_RAM_C110_ db
_RAM_C111_ db
_RAM_C112_ db
_RAM_C113_ db
_RAM_C114_ db
_RAM_C115_ db
_RAM_C116_ db
.ende
.enum $C118 export
_RAM_C118_ dsb $8
_RAM_C120_ db
.ende
.enum $C138 export
_RAM_C138_ dsb $8
_RAM_C140_ db
.ende
.enum $C158 export
_RAM_C158_ db
.ende
.enum $C160 export
_RAM_C160_ db
.ende
.enum $C178 export
_RAM_C178_ db
.ende
.enum $C198 export
_RAM_C198_ dsb $9
.ende
.enum $C1B8 export
_RAM_C1B8_ dsb $9
.ende
.enum $C1D8 export
_RAM_C1D8_ dsb $9
.ende
.enum $C200 export
_RAM_C200_ db
.ende
.enum $C202 export
_RAM_C202_ db
_RAM_C203_ db
_RAM_C204_ dw
_RAM_C206_ dw
_RAM_C208_ db
_RAM_C209_ db
.ende
.enum $C20B export
_RAM_C20B_ db
_RAM_C20C_ dw
_RAM_C20E_ dw
_RAM_C210_ db
_RAM_C211_ dw
_RAM_C213_ db
_RAM_C214_ db
_RAM_C215_ db
_RAM_C216_ db
_RAM_C217_ db
_RAM_C218_ db
_RAM_C219_ dw
_RAM_C21B_ dw
.ende
.enum $C220 export
_RAM_C220_ db
_RAM_C221_ db
_RAM_C222_ db
_RAM_C223_ dw
_RAM_C225_ db
_RAM_C226_ db
_RAM_C227_ db
_RAM_C228_ db
_RAM_C229_ db
_RAM_C22A_ db
.ende
.enum $C230 export
_RAM_C230_ dw
_RAM_C232_ dw
_RAM_C234_ dw
_RAM_C236_ dw
_RAM_C238_ dw
_RAM_C23A_ dw
_RAM_C23C_ dw
_RAM_C23E_ db
.ende
.enum $C240 export
_RAM_C240_ dsb $1a
_RAM_C25A_ db
.ende
.enum $C25C export
_RAM_C25C_ db
.ende
.enum $C260 export
_RAM_C260_ dsb $2e
.ende
.enum $C2A0 export
_RAM_C2A0_ dsb $b
.ende
.enum $C300 export
_RAM_C300_ dsb $4
_RAM_C304_ db
_RAM_C305_ db
_RAM_C306_ db
_RAM_C307_ dw
_RAM_C309_ db
_RAM_C30A_ db
.ende
.enum $C30C export
_RAM_C30C_ db
.ende
.enum $C30E export
_RAM_C30E_ db
_RAM_C30F_ db
_RAM_C310_ db
_RAM_C311_ db
_RAM_C312_ db
_RAM_C313_ db
_RAM_C314_ db
.ende
.enum $C317 export
_RAM_C317_ db
_RAM_C318_ db
.ende
.enum $C31A export
_RAM_C31A_ db
_RAM_C31B_ db
_RAM_C31C_ db
_RAM_C31D_ db
.ende
.enum $C31F export
_RAM_C31F_ db
_RAM_C320_ db
.ende
.enum $C327 export
_RAM_C327_ dw
_RAM_C329_ db
.ende
.enum $C32C export
_RAM_C32C_ db
.ende
.enum $C32E export
_RAM_C32E_ db
_RAM_C32F_ dw
_RAM_C331_ dw
.ende
.enum $C339 export
_RAM_C339_ db
.ende
.enum $C340 export
_RAM_C340_ db
.ende
.enum $C347 export
_RAM_C347_ dw
.ende
.enum $C360 export
_RAM_C360_ db
.ende
.enum $C367 export
_RAM_C367_ dw
_RAM_C369_ db
_RAM_C36A_ db
.ende
.enum $C36C export
_RAM_C36C_ db
.ende
.enum $C36E export
_RAM_C36E_ db
_RAM_C36F_ dw
_RAM_C371_ dw
.ende
.enum $C374 export
_RAM_C374_ db
.ende
.enum $C37B export
_RAM_C37B_ dw
.ende
.enum $C3A0 export
_RAM_C3A0_ db
.ende
.enum $C3A2 export
_RAM_C3A2_ db
_RAM_C3A3_ db
.ende
.enum $C3A5 export
_RAM_C3A5_ db
.ende
.enum $C3A7 export
_RAM_C3A7_ dw
.ende
.enum $C3AA export
_RAM_C3AA_ db
.ende
.enum $C3AC export
_RAM_C3AC_ db
.ende
.enum $C3AE export
_RAM_C3AE_ db
.ende
.enum $C3B7 export
_RAM_C3B7_ db
.ende
.enum $C3B9 export
_RAM_C3B9_ db
_RAM_C3BA_ db
.ende
.enum $C3BF export
_RAM_C3BF_ db
_RAM_C3C0_ db
.ende
.enum $C3C2 export
_RAM_C3C2_ db
.ende
.enum $C3C7 export
_RAM_C3C7_ dw
.ende
.enum $C3CC export
_RAM_C3CC_ db
.ende
.enum $C3CE export
_RAM_C3CE_ db
_RAM_C3CF_ dw
_RAM_C3D1_ dw
.ende
.enum $C3D4 export
_RAM_C3D4_ db
.ende
.enum $C3D7 export
_RAM_C3D7_ db
_RAM_C3D8_ db
.ende
.enum $C3DA export
_RAM_C3DA_ db
_RAM_C3DB_ db
_RAM_C3DC_ dw
_RAM_C3DE_ dw
_RAM_C3E0_ db
.ende
.enum $C3E7 export
_RAM_C3E7_ dw
.ende
.enum $C3EC export
_RAM_C3EC_ db
.ende
.enum $C3EE export
_RAM_C3EE_ db
_RAM_C3EF_ dw
.ende
.enum $C400 export
_RAM_C400_ db
.ende
.enum $C500 export
_RAM_C500_ db
.ende
.enum $C5C0 export
_RAM_C5C0_ db
.ende
.enum $C5C7 export
_RAM_C5C7_ dw
.ende
.enum $C5CC export
_RAM_C5CC_ db
.ende
.enum $C5CE export
_RAM_C5CE_ db
.ende
.enum $C5E0 export
_RAM_C5E0_ db
.ende
.enum $C640 export
_RAM_C640_ db
.ende
.enum $C657 export
_RAM_C657_ db
.ende
.enum $C660 export
_RAM_C660_ db
.ende
.enum $C677 export
_RAM_C677_ db
.ende
.enum $C680 export
_RAM_C680_ db
.ende
.enum $C700 export
_RAM_C700_ dsb $6
_RAM_C706_ db
.ende
.enum $C780 export
_RAM_C780_ db
.ende
.enum $C800 export
_RAM_C800_ dsb $8
_RAM_C808_ dw
_RAM_C80A_ dw
.ende
.enum $C828 export
_RAM_C828_ dsb $24
.ende
.enum $C850 export
_RAM_C850_ dsb $24
.ende
.enum $C878 export
_RAM_C878_ dsb $24
.ende
.enum $C908 export
_RAM_C908_ dsb $2e
.ende
.enum $CA08 export
_RAM_CA08_ dsb $24
_RAM_CA2C_ dsb $8
.ende
.enum $CA48 export
_RAM_CA48_ dsb $8
.ende
.enum $CA94 export
_RAM_CA94_ db
.ende
.enum $CA9C export
_RAM_CA9C_ db
.ende
.enum $CAA4 export
_RAM_CAA4_ db
.ende
.enum $CB08 export
_RAM_CB08_ dsb $8
.ende
.enum $CB48 export
_RAM_CB48_ dsb $8
.ende
.enum $CBB4 export
_RAM_CBB4_ dsb $8
.ende
.enum $CBF4 export
_RAM_CBF4_ dsb $8
.ende
.enum $CC06 export
_RAM_CC06_ db
.ende
.enum $CC08 export
_RAM_CC08_ db
.ende
.enum $CCD4 export
_RAM_CCD4_ db
.ende
.enum $CCD8 export
_RAM_CCD8_ db
.ende
.enum $CCDC export
_RAM_CCDC_ db
.ende
.enum $CCE0 export
_RAM_CCE0_ db
.ende
.enum $CCE4 export
_RAM_CCE4_ db
.ende
.enum $CCE8 export
_RAM_CCE8_ db
.ende
.enum $CCEC export
_RAM_CCEC_ db
.ende
.enum $CCF0 export
_RAM_CCF0_ db
.ende
.enum $CCF4 export
_RAM_CCF4_ dsb $4
_RAM_CCF8_ db
.ende
.enum $CD44 export
_RAM_CD44_ dsb $12
.ende
.enum $CE84 export
_RAM_CE84_ db
.ende
.enum $CF00 export
_RAM_CF00_ db
.ende
.enum $CF38 export
_RAM_CF38_ db
.ende
.enum $CF80 export
_RAM_CF80_ dsb $20
_RAM_CFA0_ dsb $20
_RAM_CFC0_ db
.ende
.enum $CFE0 export
_RAM_CFE0_ db
.ende
.enum $D000 export
_RAM_D000_ dsb $503
_RAM_D503_ db
_RAM_D504_ db
.ende
.enum $D506 export
_RAM_D506_ db
.ende
.enum $D700 export
_RAM_D700_ db
.ende
.enum $D7D0 export
_RAM_D7D0_ db
_RAM_D7D1_ db
.ende
.enum $D7DA export
_RAM_D7DA_ db
.ende
.enum $D800 export
_RAM_D800_ db
_RAM_D801_ db
_RAM_D802_ db
_RAM_D803_ db
_RAM_D804_ db
_RAM_D805_ db
_RAM_D806_ db
_RAM_D807_ db
.ende
.enum $D8A0 export
_RAM_D8A0_ db
.ende
.enum $D900 export
_RAM_D900_ dsb $600
.ende
.enum $FFFF export
_RAM_FFFF_ db
.ende
; Ports
.define Port_PSG $7F
.define Port_VDPData $BE
.define Port_VDPAddress $BF
.define _PORT_DE_ $DE
.define _PORT_DF_ $DF
; Input Ports
.define Port_VDPStatus $BF
.define Port_IOPort1 $DC
.define Port_IOPort2 $DD
.BANK 0 SLOT 0
.ORG $0000
_LABEL_0_:
di
im 1
ld sp, $DFF0
jr _LABEL_85_
_LABEL_8_:
ld a, e
out (Port_VDPAddress), a
ld a, d
out (Port_VDPAddress), a
ret
; Data from F to F (1 bytes)
.db $FF
_LABEL_10_:
add a, a
ld c, a
ld b, $00
add hl, bc
ld a, (hl)
inc hl
ld h, (hl)
ld l, a
ret
; Data from 1A to 1A (1 bytes)
.db $FF
_LABEL_1B_:
bit 7, a
ret z
and $0F
_LABEL_20_:
add a, a
_LABEL_21_:
ld e, a
ld d, $00
add hl, de
ld a, (hl)
inc hl
ld h, (hl)
ld l, a
jp (hl)
; Data from 2A to 2F (6 bytes)
.db $FF $FF $FF $FF $FF $FF
_LABEL_30_:
rst $08 ; _LABEL_8_
ld c, Port_VDPData
-:
outi
jr nz, -
ret
_LABEL_38_:
jp _LABEL_C0_
; Jump Table from 3B to 52 (12 entries, indexed by _RAM_C01F_)
_DATA_3B_:
.dw _LABEL_76D_ _LABEL_76D_ _LABEL_9E5_ _LABEL_194F_ _LABEL_18CE_ _LABEL_1BC9_ _LABEL_6C05_ _LABEL_7DC2_
.dw _LABEL_1650_ _LABEL_A88_ _LABEL_A88_ _LABEL_1FCD_
_LABEL_53_:
xor a
ld (_RAM_C01F_), a
-:
ld hl, _RAM_C01F_
ld a, (hl)
and $0F
exx
ld hl, _DATA_3B_
rst $20 ; _LABEL_20_
jp -
; Data from 65 to 65 (1 bytes)
.db $FF
_LABEL_66_:
push af
ld a, (_RAM_C31A_)
cp $0F
jp z, +
ld a, (_RAM_C015_)
or a
jp nz, +
ld a, (_RAM_C01F_)
cp $8A
jr c, +
ld a, $01
ld (_RAM_C093_), a
+:
pop af
retn
_LABEL_85_:
ld a, $82
ld (_RAM_FFFF_), a
call _LABEL_9E02_
ld hl, _RAM_C000_
ld de, _RAM_C000_ + 1
ld bc, $1FFF
ld (hl), l
ldir
call _LABEL_341_
call _LABEL_350_
-:
ld a, $82
ld (_RAM_FFFF_), a
ld sp, $DFF0
call _LABEL_9E02_
call _LABEL_26B_
ld hl, $0000
ld de, $4000
ld bc, $3800
call _LABEL_184_
ei
call _LABEL_2F6_
jp _LABEL_53_
_LABEL_C0_:
push af
push bc
push de
push hl
exx
ex af, af'
push af
push bc
push de
push hl
push ix
push iy
in a, (Port_VDPStatus)
in a, (Port_IOPort2)
and $10
ld hl, _RAM_C096_
ld c, (hl)
ld (hl), a
xor c
and c
jp nz, -
ld a, (_RAM_FFFF_)
push af
ld a, (_RAM_C008_)
rrca
push af
call c, _LABEL_1F7_
call _LABEL_41AC_
pop af
rrca
push af
call _LABEL_367_
call _LABEL_107C_
pop af
rrca
push af
call _LABEL_264F_
pop af
rrca
ld a, (_RAM_C01F_)
ld hl, _DATA_127_
call c, _LABEL_1B_
ld a, $82
ld (_RAM_FFFF_), a
call _LABEL_984F_
xor a
ld (_RAM_C008_), a
pop af
ld (_RAM_FFFF_), a
pop iy
pop ix
pop hl
pop de
pop bc
pop af
exx
ex af, af'
pop hl
pop de
pop bc
pop af
ei
ret
; Jump Table from 127 to 13E (12 entries, indexed by _RAM_C01F_)
_DATA_127_:
.dw _LABEL_842_ _LABEL_842_ _LABEL_A35_ _LABEL_1A01_ _LABEL_18CD_ _LABEL_1BEE_ _LABEL_6EA7_ _LABEL_7F22_
.dw _LABEL_16A6_ _LABEL_AB1_ _LABEL_AB1_ _LABEL_1FE6_
_LABEL_13F_:
push af
rst $08 ; _LABEL_8_
pop af
out (Port_VDPData), a
ret
_LABEL_145_:
rst $08 ; _LABEL_8_
ld a, c
or a
jr z, +
inc b
+:
ld a, b
ld b, c
ld c, Port_VDPData
-:
outi
jp nz, -
dec a
jp nz, -
ret
_LABEL_159_:
rst $08 ; _LABEL_8_
ld a, (_RAM_C10A_)
ld c, Port_VDPData
-:
outi
push af
pop af
out (c), a
jr nz, -
ret