-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.asm
875 lines (658 loc) · 21.4 KB
/
main.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
INCDIR ""
INCLUDE "photon/PhotonsMiniWrapper1.04!.S"
INCLUDE "photon/Blitter-Register-List.S"
INCLUDE "common.s"
INCLUDE "input.s"
INCLUDE "tile.s"
INCLUDE "test.asm"
INCLUDE "tile.asm"
INCLUDE "map.asm"
INCLUDE "scroll.asm"
INCLUDE "input.asm"
INCLUDE "debug.asm"
*******************************************************************************
* GAME
*******************************************************************************
Init:
movem.l d0-a6,-(sp)
lea Screen,a1
lea screen_bytes_per_row*tile_height(a1),a1
bsr.w ClearScreen
lea Screen,a0
move.l #screen_bpl_bytes_per_row*screen_bitplanes*(screen_buffer_height+2),d0
.clr
move.b #0,(a0)+
dbf d0,.clr
lea FastData,a0
move.b #level_01_main_map_rows,v_map_tile_height(a0)
move.b #level_01_main_map_cols,v_map_tile_width(a0)
move.w #level_01_main_map_cols*16,v_map_width(a0)
move.w #level_01_main_map_rows*16,v_map_height(a0)
move.w #eight_by_four_map_bytes_per_tile_row,v_map_bytes_per_tile_row(a0)
move.w #eight_by_four_map_bpl_bytes_per_row,v_map_source_bpl_bytes_per_row(a0)
move.w #eight_by_four_map_bytes_per_row,v_map_source_bytes_per_row(a0)
move.b #level_01_main_map_cols,v_current_map_columns(a0)
move.b #level_01_main_map_rows,v_current_map_rows(a0)
move.l #level_01_main_map_cols*2*map_bitplanes*tile_height*level_01_main_map_rows,v_map_bytes(a0) =
;level_01_dungeon_map_cols = 64
;level_01_dungeon_map_rows = 24
lea TilesSourceLevel01,a1
move.l a1,v_tile_source(a0)
lea Map,a2
lea MapSourceLevel01,a1
move.l #level_01_main_map_rows-1,d0
move.l #level_01_main_map_cols-1,d1
bsr LoadLevelMap
bsr AssembleSourceTilesIntoMapSourceBitmap
lea FastData,a0
lea MapSourceBitmap,a3
lea Screen,a4
bsr CopyScreenFromMapSourceBitmap
; some test code
move.b #test_cols_to_decode,v_current_map_columns(a0)
move.b #test_rows_to_decode,v_current_map_rows(a0)
lea TESTEncodedTilesSource,a1
move.l a1,v_tile_source(a0)
lea Map,a2
lea TESTMapSource,a1
bsr TESTLoadLevel1Map
bsr DecodeAndAssembleSourceTilesIntoMapSourceBitmap
lea FastData,a0
lea MapSourceBitmap,a3
lea Screen,a4
bsr TESTCopyScreenFromMapSourceBitmap
;test code ends
;SetScreenBufferPointersInFastMem
lea FastData,a1
lea Screen,a0 ;ptr to first bitplane of image
move.l a0,v_screen(a1)
move.l a0,v_scroll_screen(a1)
move.l a0,v_scroll_screen_split(a1)
move.l a0,d2
move.l d2,d3
add.l #screen_buffer_bytes,d3
move.l d3,v_screen_end(a1)
;SetCopperScreenBitplanePointers
lea Copper,a1 ;where to poke the bitplane pointer words.
move #screen_bitplanes-1,d0
.bpl7:
move.l a0,d1
swap d1
swap d2
move.w d1,c_bitplane_pointers_01(a1) ;hi word
move.w d2,c_bitplane_pointers_02(a1) ;hi word
swap d1
swap d2
move.w d1,4+c_bitplane_pointers_01(a1) ;lo word
move.w d2,4+c_bitplane_pointers_02(a1) ;lo word
addq #8,a1 ;point to next bpl to poke in copper
lea screen_bp_bytes_per_raster_line(a0),a0 ;every 44 bytes we'll have new bitplane data
add.l #screen_bp_bytes_per_raster_line,d2
dbf d0,.bpl7
bsr SetupDebugStrings
bsr InputInitControllers
movem.l (sp)+,d0-a6
rts
*******************************************************************************
* START
*******************************************************************************
StartGame:
bsr.w Init
lea $DFF000,a6
move.w #$7FFF,DMACON(a6) ;disable all bits in DMACON
move.w #$87E0,DMACON(a6) ;SET+BLTPRI+DMAEN+BPLEN+COPEN+BLTEN+SPREN
move.w #0,$01fc(a6) ;slow fetch mode, AGA compatibility
move.w #$24,BPLCON2(a6)
move.w #$200,BPLCON0(a6)
move.w #vert_display_start<<8+h_display_start,DIWSTRT(a6)
move.w #vert_display_stop<<8+h_display_stop,DIWSTOP(a6)
move.w #DMA_fetch_start,DDFSTRT(a6) ;$28 for 22 columns; $38 for 20 columns (etc)
move.w #DMA_fetch_stop,DDFSTOP(a6) ;$d0 for 22 columns; $c0 for 20 columns
move.w #screen_modulo,BPL1MOD(a6)
move.w #screen_modulo,BPL2MOD(a6)
move.l #Copper,COP1LCH(a6)
move.l #VBint,$6c(a4) ;set vertb interrupt vector compatibly.
move.w #$c020,INTENA(a6) ;enable interrupts generally
;and vertb specifically.
bsr.s Main
rts
*******************************************************************************
* MAIN
*******************************************************************************
Main:
movem.l d0-a6,-(sp)
.WaitMouse
moveq #1,d0
lea FastData,a0
bsr InputReadController
btst.b #4,v_joystick_value(a0) ;16=kill code (fire button)
bne .quit
btst #6,$bfe001
bne.s .WaitMouse
.quit
movem.l (sp)+,d0-a6
rts
*******************************************************************************
* TEST ROUTINES
*******************************************************************************
TESTVBCode:
lea FastData,a0
bsr TESTScroll
bsr TESTUpdateMapXMapYDebugStrings
rts
;-----------------------------------------------
TESTScroll:
*-------------*
* ALGORITHM *
*-------------*
*****************************************************
** BLIT ORDER: R->D->U->L (BLIT IN ASCENDING MODE) **
*****************************************************
.continue
bsr ScrollGetStepAndDelay
bsr ScrollGetDirectionalVectors
cmp.b #1,v_scroll_vector_x(a0) ;right?
bne .check_down
bsr .right
.check_down
cmp.b #1,v_scroll_vector_y(a0) ;down?
bne .check_up
bsr .down
bra .check_left
.check_up
cmp.b #15,v_scroll_vector_y(a0) ;up?
bne .check_left
bsr .up
.check_left
cmp.b #15,v_scroll_vector_x(a0) ;left?
bne .update_joystick
bsr .left
.update_joystick
move.b v_joystick_value(a0),v_previous_joystick_value(a0)
rts
***********************************************
*** R: All blocks fill column (left column) ***
*** ***
***********************************************
.right
cmp.w #0,d1 ;INPUT:d2,a0 (d1)
bne .get_xy_position_right
;tile is completely scrolled through; time to move the pointers
addi.w #1,v_tile_x_position(a0)
.increment_x
move.l #1,d4
lea Copper,a1
bsr ScrollUpdateBitplanePointers
.get_xy_position_right
bsr ScrollGetMapXYForHorizontal
add.w #screen_columns+1,d3 ;mapx = mapposx / BLOCKWIDTH + BITMAPBLOCKSPERROW;
bsr ScrollUpdateSaveWordRight
lea MapSourceBitmap,a3
lea MapSourceBitmapE,a5
bsr ScrollGetHTileOffsets
lea TileDrawVerticalJumpTable,a4
move.l (a4,d7.w),a4
jsr (a4)
bsr ScrollIncrementXPosition ;INPUT: mapx/y in d3; x/y in d4
bsr ScrollGetStepAndDelay
lea Copper,a1 ;Copper Horizontal Scroll pos
move.w d0,c_horizontal_scroll_pos_01(a1) ;update copper
move.b #1,v_scroll_previous_x_direction(a0) ;previous_direction = DIRECTION_RIGHT
rts
************************************************
*** L: All blocks fill column (right column) ***
*** If D, skip [B]. If U, skip [D] ***
************************************************
.left
bsr ScrollDecrementXPosition
bsr ScrollGetStepAndDelay
cmp.w #0,d1
bne .get_map_xy_left
;tile is completely scrolled through; time to move the pointers
subi.w #1,v_tile_x_position(a0)
.decrement_x
move.l #$0000FFFF,d4
lea Copper,a1
bsr ScrollUpdateBitplanePointers
.get_map_xy_left
bsr ScrollGetMapXYForHorizontal
bsr ScrollUpdateSaveWordLeft
lea MapSourceBitmap,a3
lea MapSourceBitmapE,a5
bsr ScrollGetHTileOffsets
lea TileDrawVerticalJumpTable,a4
move.l (a4,d7.w),a4
jsr (a4)
;needed for change of direction
bsr ScrollGetStepAndDelay
.update_left_scroll_pos
lea Copper,a1 ;Copper Horizontal Scroll pos
move.w d0,c_horizontal_scroll_pos_01(a1) ;update copper
move.b #8,v_scroll_previous_x_direction(a0) ;previous_direction = DIRECTION_LEFT
rts
*******************************************
*** U: All blocks fill row (bottom row) ***
*** If R, skip [C] ***
*******************************************
.up
bsr ScrollDecrementYPosition
move.l #$FFFF0000,d4
lea Copper,a1
bsr ScrollUpdateBitplanePointers ;INPUT:d4=(dx=lw;dy=hw);a0=FastData;a1=Copper
.get_xy_position_up
bsr ScrollGetMapXYForVertical
swap d3
add.w #1,d3 ;mapy+1--row under visible screen
swap d3
lea MapSourceBitmap,a3
lea MapSourceBitmapE,a5
bsr ScrollGetVTileOffsets
lea TileDrawHorizontalJumpTable,a4
move.l (a4,d7.w),a4
jsr (a4)
rts
****************************************
*** D: All blocks fill row (top row) ***
*** If R, skip [A] ***
****************************************
.down
move.l #$10000,d4
lea Copper,a1
bsr ScrollUpdateBitplanePointers ;INPUT:d4=(dx=lw;dy=hw);a0=FastData;a1=Copper
.get_xy_position_down
bsr ScrollGetMapXYForVertical
lea MapSourceBitmap,a3
lea MapSourceBitmapE,a5
bsr ScrollGetVTileOffsets
lea TileDrawHorizontalJumpTable,a4
move.l (a4,d7.w),a4
jsr (a4)
.end_down
bsr ScrollIncrementYPosition ;INPUT: mapx/y in d3; x/y in d4
.end_scroll
rts
*******************************************************************************
* ROUTINES
*******************************************************************************
VBCode:
rts
;-----------------------------------------------
DecodeAndAssembleSourceTilesIntoMapSourceBitmap:
;SCREEN LO-RES
;W: 2048; H=256
;8 pixels/byte
;32 bytes per line/16 words per line
;done to show how to extract Black Tiger-encoded image data
;32*32*4
lea MapSourceBitmap,a0
lea FastData,a1
move.l a0,v_tile_map_row_dest(a1)
move.l (MapSourceBitmapE-MapSourceBitmap)/4,d0
.l0:
clr.l (a0)+
dbf d0,.l0
clr.l d0
lea Map,a0 ;Starting tile
lea FastData,a2
lea v_tile_map_row_dest(a2),a1
move.l (a1),v_tile_map_dest(a2)
move.l #0,d5
.loop_rows
move.l #0,d4
.loop_columns
move.l v_tile_map_dest(a2),a3
move.b #0,d1
move.l v_tile_source(a2),a1
move.w (a0)+,d0
btst #15,d0
beq .no_flip
move.b #1,d1
.no_flip
andi.w #tile_index_mask,d0
asl.l #$06,d0
lea (a1,d0.l),a1
lea FastData,a2
lea v_decoded_bitplane_bytes(a2),a5 ;stores intermediate decoded bitplane bytes
bsr TESTExtractTile
lea FastData,a2
lea v_current_map_columns(a2),a4
add.l #2,v_tile_map_dest(a2)
addi.b #1,d4
.check_loop
cmp.b (a4),d4
bne .loop_columns
lea FastData,a2
move.l v_tile_map_row_dest(a2),a1
adda.l #test_bmp_vtile_offset,a1
move.l a1,v_tile_map_dest(a2)
move.l a1,v_tile_map_row_dest(a2)
lea v_current_map_rows(a2),a4
addi.b #1,d5
cmp.b (a4),d5
bne .loop_rows
rts
;-----------------------------------------------
ClearScreen: ;a1=screen destination address to clear
WAITBLIT
clr.w $66(a6) ;destination modulo
move.l #$01000000,$40(a6) ;set operation type in BLTCON0/1
move.l a1,$54(a6) ;destination address
move.w #screen_height*bpls*64+screen_bp_bytes_per_raster_line/2,$58(a6) ;blitter operation size
rts
;-----------------------------------------------
VBint: ;Blank template VERTB interrupt
movem.l d0-a6,-(sp) ;Save used registers
lea $DFF000,a6
btst #5,INTREQR(a6) ;INTREQR check if it's our vertb int.
beq.s .notvb
moveq #$20,d0 ;poll irq bit
move.w d0,INTREQ(a6)
move.w d0,INTREQ(a6)
bsr TESTVBCode
bsr VBCode
.notvb:
movem.l (sp)+,d0-a6 ;restore
rte
;-----------------------------------------------
even
*******************************************************************************
* DATA (FASTMEM)
*******************************************************************************
TilesSourceLevel01: INCBIN "gfx/Level01/tiles/all_tiles_256x336x5"
TilesLevel1SourceE:
EVEN
MapSourceLevel01: INCBIN "gfx/Level01/map/main_128x48"
MapSourceLevel1E:
EVEN
MapSourceDungeonLevel1: INCBIN "gfx/Level01/map/dungeon_64x24"
MapSourceDungeonLevel1E:
EVEN
MapSourceWiseManLevel1: INCBIN "gfx/Level01/map/wiseman_16x7"
MapSourceWiseManLevel1E:
EVEN
TESTEncodedTilesSource: INCBIN "gfx/gfx2.bin"
EVEN
TESTMapSource: INCBIN "data/lev_1_scroll_data.bin"
EVEN
DebugFontBitmapSource: INCBIN "gfx/debug_alpha80x32x2.raw"
DebugFontBitmapSourceE:
EVEN
Map: ;TODO: Dynamic alloc?
ds.w (test_cols_to_decode+1)*(test_rows_to_decode+1)*tile_height
; ds.w (level_01_main_map_cols+1)*(level_01_main_map_rows+1)*tile_height;TO REPLACE
FastData:
;v_tile_y_position
;v_tile_x_position
dc.l 0
;v_tile_map_dest
dc.l 0
;v_tile_map_row_dest
dc.l 0
;v_screen
dc.l 0
;v_tile_source
dc.l 0
;v_map_y_position
;v_map_x_position
dc.l $00000000
;v_video_y_position
;v_video_x_position
dc.l $00000000
;v_map_source_bytes_per_row
dc.w 0
;v_scroll_vector_x
dc.b 0
;v_scroll_vector_y
dc.b 0
;v_scroll_screen
dc.l 0
;v_scroll_screen_split
dc.l 0
;v_scroll_ptr_saveword
dc.l 0
;v_map_width
dc.w 0
;v_map_bytes_per_tile_row
dc.w 0
;v_map_bytes
dc.l 0
;v_map_height
dc.w 0
;v_map_source_bpl_bytes_per_row
dc.w 0
;v_scrollx_dest_offset_table
dc.w $8700,$0000,$0900,$1200,$1B00,$2400,$2D00,$3600;TASK (2)
dc.w $3F00,$4800,$5100,$5A00,$6300,$6C00,$7500,$7E00;TASK (2)
;TO REPLACE TASK (2)
;dc.w $A8C0,$0000,$0B40,$1680,$21C0,$2D00,$3840,$4380
;dc.w $4EC0,$5A00,$6540,$7080,$7BC0,$8700,$9240,$9D80
;END TO REPLACE TASK (2)
;v_scrolly_dest_offset_table
dc.w $0000,$0002,$0004,$0006,$0008,$000C,$000E,$0010
dc.w $0012,$0014,$0016,$0018,$001C,$001E,$0020,$0022
;v_scroll_saveword
dc.w 0
;v_video_x_bitplane_offset
dc.w screen_bpl_bytes_per_row-2
;v_scroll_positions
dc.b $00,$FF,$EE,$DD,$CC,$BB,$AA,$99
dc.b $88,$77,$66,$55,$44,$33,$22,$11
;v_screen_end
dc.l 0
;v_unused_04
dc.b $B0,$A0,$90,$80
dc.b $70,$60,$50,$40,$30,$20,$10,$00
;v_decoded_bitplane_bytes
dc.b 0,0,0,0,0,0,0,0,0,0
;v_current_map_columns
dc.b 0
;v_current_map_rows
dc.b 0
;v_joystick_value
dc.b 0
;v_scroll_previous_x_direction
dc.b 1
;v_y_scroll_velocity
dc.b 1
;v_x_scroll_velocity
dc.b 1
;v_previous_joystick_value
dc.b 0
;v_previous_x_step_value
dc.b 0
;v_previous_y_step_value
dc.b 0
;v_map_tile_width
dc.b 0
;v_map_tile_height
dc.b 0
;v_debug_char_lut
;blk.b 16,9
dc.b $09,$09,$09,$09,$09,$09,$09,$09,$09,$09,$09,$09,$09,$09,$09,$09
dc.b $1C,$1E,$1F,$20,$21,$22,$23,$24,$25,$26,$09,$09,$09,$09,$09,$09
dc.b $09,$00,$01,$02,$03,$04,$05,$06,$07,$08,$0A,$0B,$0C,$0D,$0E,$0F
dc.b $10,$11,$12,$14,$15,$16,$17,$18,$19,$1A,$1B,$09,$09,$09,$09,$09
;v_debug_hexchar_lut
dc.b "0123456789ABCDEF"
;v_text_buffer
ds.b 4
EVEN
DebugStringMapX:
dc.b "MAPX ",0
DebugStringMapY:
dc.b "MAPY ",0
DebugStringMa:
dc.b "MA",0
DebugStringPx:
dc.b "PX",0
DebugStringPy:
dc.b "PY",0
*******************************************************************************
* CHIPMEM
*******************************************************************************
SECTION AllData,DATA_C
Copper:
dc.w $0180,$0111
dc.w $1401,$fffe ;dc.w $2b01,$fffe
dc.w BPLCON0,$0200
dc.b 0,DIWSTRT,vert_display_start,h_display_start
dc.b 0,DIWSTOP,vert_display_stop,h_display_stop
dc.w DDFSTRT,DMA_fetch_start ;$28 for 22 columns; $38 for 20 columns (etc)
dc.w DDFSTOP,DMA_fetch_stop ;$d0 for 22 columns; $c0 for 20 columns
dc.w BPL1MOD,screen_modulo
dc.w BPL2MOD,screen_modulo
;c_horizontal_scroll_pos_01
dc.w BPLCON1,$0000
;c_sprites_enable_01
dc.w $01fe,$0000 ;NOP
;c_palette_01
tile_pal_0f
;level_1_main_pal; TO REPLACE
;c_bitplane_pointers_01
dc.w $00e0,0 ;1
dc.w $00e2,0
dc.w $00e4,0 ;2
dc.w $00e6,0
dc.w $00e8,0 ;3
dc.w $00ea,0
dc.w $00ec,0 ;4
dc.w $00ee,0
; dc.w $00f0,0;TO UNCOMMENT ;5
; dc.w $00f2,0;TO UNCOMMENT
; dc.w $00f4,0 ;6
; dc.w $00f6,0
;c_sprites01_cols
dc.w $1a2,0
dc.w $1a4,0
dc.w $1a6,0
;dc.w $01fe,0;TO REPLACE
;dc.w $01fe,0;TO REPLACE
;dc.w $01fe,0;TO REPLACE
;c_sprites23_cols
dc.w $1a8,$0000
dc.w $1aa,$0111
dc.w $1ac,$0ddd
;dc.w $01fe,$0000;TO REPLACE
;dc.w $01fe,$0000;TO REPLACE
;dc.w $01fe,$0000;TO REPLACE
;c_sprites45_cols
dc.w $1ae,$0000
dc.w $1b0,$0d00
dc.w $1b2,$0ddd
;dc.w $01fe,$0000;TO REPLACE
;dc.w $01fe,$0000;TO REPLACE
;dc.w $01fe,$0000;TO REPLACE
;c_sprites67_cols
dc.w $1b4,$0d00
dc.w $1b6,$00f0
dc.w $1b8,$0ddd
;dc.w $01fe,$0000;TO REPLACE
;dc.w $01fe,$0000;TO REPLACE
;dc.w $01fe,$0000;TO REPLACE
;c_sprite00
dc.w $120,0 ;SPR0PTH
dc.w $122,0 ;SPR0PTL
;c_sprite01
dc.w $124,0 ;SPR1PTH
dc.w $126,0 ;SPR1PTL
;c_sprite02
dc.w $128,0
dc.w $12a,0
;c_sprite03
dc.w $12c,0
dc.w $12e,0
;c_sprite04
dc.w $130,0
dc.w $132,0
;c_sprite05
dc.w $134,0
dc.w $136,0
;c_null_sprites
dc.w $138,0
dc.w $13a,0
dc.w $13c,0
dc.w $13e,0
;c_display_enable_01
dc.w BPLCON0,$4200
;dc.w BPLCON0,$5200;TO REPLACE
;c_split_stop
dc.w $ffdf,$fffe
;c_split
dc.w $2c01,$fffe
;c_bitplane_pointers_02
dc.w $00e0,0 ;1
dc.w $00e2,0
dc.w $00e4,0 ;2
dc.w $00e6,0
dc.w $00e8,0 ;3
dc.w $00ea,0
dc.w $00ec,0 ;4
dc.w $00ee,0
; dc.w $00f0,0;TO UNCOMMENT ;5
; dc.w $00f2,0;TO UNCOMMENT
; dc.w $00f4,0 ;6
; dc.w $00f6,0
; dc.w $0180,$0FF9
dc.w $ffff,$fffe
CopperE:
EVEN
DebugStringMapXBitmap:
ds.b debug_string_mapx_size
DebugStringMapYBitmap:
ds.b debug_string_mapy_size
Sprite00:
dc.w $304C,$4200 ;Vstart.b,Hstart/2.b,Vstop.b,%A0000SEH
ds.w 20
Sprite00Line02:
ds.w 18
Sprite01:
dc.w $3054,$4200 ;Vstart.b,Hstart/2.b,Vstop.b,%A0000SEH
ds.w 20
Sprite01Line02:
ds.w 18
Sprite02:
dc.w $2C40,$0000 ;Vstart.b,Hstart/2.b,Vstop.b,%A0000SEH
REPT 256
dc.w $FFFF,$0000
ENDR
dc.w 0,0
Sprite03:
dc.w $3066,$4200 ;Vstart.b,Hstart/2.b,Vstop.b,%A0000SEH
ds.w 20
Sprite03Line02:
ds.w 18
Sprite04:
dc.w $3060,$4200 ;Vstart.b,Hstart/2.b,Vstop.b,%A0000SEH
ds.w 20
Sprite04Line02:
ds.w 18
Sprite05:
dc.w $3068,$4200 ;Vstart.b,Hstart/2.b,Vstop.b,%A0000SEH
ds.w 20
Sprite05Line02:
ds.w 18
NullSpr:
dc.w $2a20,$2b00
dc.w 0,0
dc.w 0,0
*******************************************************************************
* BUFFERS
*******************************************************************************
SECTION AllBuffers,BSS_C
Screen:
ds.b screen_bpl_bytes_per_row*screen_bitplanes*(screen_buffer_height+2+16)
ScreenE:
Screen2:
ds.b screen_bpl_bytes_per_row*screen_bitplanes*(screen_buffer_height+2+16)
Screen2E:
EVEN
MapSourceBitmap:
ds.b map_bytes
MapSourceBitmapE:
;MapSourceDungeonBitmap:
; ds.b map_dungeon_bytes
;MapSourceDungeonBitmapE:
;
;MapSourceWisemanShopBitmap:
; ds.b map_wiseman_bytes
;MapSourceWisemanShopBitmapE: