Initial Tiled tile animation export support

* Tiled tile animations read from TSX files
* Hooks for initialization generated by the tiled export tool
* Animated tiles implements with dynamic tiles backed by 2KB of direct
  page space in Bank 00
* Animation resolution limited to 1/60th incremenents

TODO
* Fix crasher in the _DoScriptSequ timer callback
* Fix single-line of garbage on the top line of the dynamic tiles
This commit is contained in:
Lucas Scharenbroich 2021-10-06 07:10:09 -05:00
parent 7d7a54a731
commit 87ded17e20
23 changed files with 7023 additions and 885 deletions

View File

@ -69,7 +69,7 @@ MoveDown
; Very simple, scroll as fast as possible ; Very simple, scroll as fast as possible
oldOneSecondCounter ds 2 oldOneSecondCounter ds 2
frameCount ds 2 frameCount ds 2
lastTick ds 2
Demo Demo
ldal OneSecondCounter ldal OneSecondCounter
sta oldOneSecondCounter sta oldOneSecondCounter
@ -77,24 +77,13 @@ Demo
; Every 3 ticks (20 fps) cycle some colors ; Every 3 ticks (20 fps) cycle some colors
lda #DoColorCycle ; lda #DoColorCycle
ldx #^DoColorCycle ; ldx #^DoColorCycle
ldy #3 ; ldy #3
jsl AddTimer ; jsl AddTimer
:loop :loop
PushLong #0 jsl DoTimers
_GetTick
pla
plx
cmp lastTick ; Throttle to 60 fps
beq :loop
tax ; Calculate the increment
sec
sbc lastTick
stx lastTick
; jsr _DoTimers
; lda #1 ; lda #1
; jsr MoveLeft ; jsr MoveLeft
@ -227,3 +216,5 @@ _ApplyAngle
rts rts

View File

@ -8,16 +8,14 @@
use EDS.GSOS.MACS.s use EDS.GSOS.MACS.s
use Tool222.Macs.s use Tool222.Macs.s
use Util.Macs.s use Util.Macs.s
use CORE.MACS.s
use ../../src/GTE.s use ../../src/GTE.s
use ../../src/Defs.s use ../../src/Defs.s
mx %00 mx %00
; External references
tiledata ext
; Feature flags ; Feature flags
NO_INTERRUPTS equ 1 ; turn off for crossrunner debugging NO_INTERRUPTS equ 0 ; turn off for crossrunner debugging
NO_MUSIC equ 1 ; turn music + tool loading off NO_MUSIC equ 1 ; turn music + tool loading off
; Typical init ; Typical init
@ -26,25 +24,31 @@ NO_MUSIC equ 1 ; turn music + tool loading of
jsl EngineStartUp jsl EngineStartUp
lda #^MyPalette
ldx #MyPalette
ldy #0
jsl SetPalette
ldx #0 ldx #0
jsl SetScreenMode jsl SetScreenMode
; Set up our level data ; Set up our level data
; jsr BG0SetUp jsr BG0SetUp
; jsr BG1SetUp ; jsr BG1SetUp
jsr TileAnimInit
; Allocate room to load data ; Allocate room to load data
jsl AllocBank ; Alloc 64KB for Load/Unpack jsl AllocBank ; Alloc 64KB for Load/Unpack
sta BankLoad ; Store "Bank Pointer" sta BankLoad ; Store "Bank Pointer"
; jsr MovePlayerToOrigin ; Put the player at the beginning of the map jsr MovePlayerToOrigin ; Put the player at the beginning of the map
; lda #DIRTY_BIT_BG0_REFRESH ; Redraw all of the tiles on the next Render lda #DIRTY_BIT_BG0_REFRESH ; Redraw all of the tiles on the next Render
; ora #DIRTY_BIT_BG1_REFRESH ora #DIRTY_BIT_BG1_REFRESH
; tsb DirtyBits tsb DirtyBits
; lda #$FFFF lda #$FFFF
jsl Render jsl Render
EvtLoop EvtLoop
jsl ReadControl jsl ReadControl
@ -54,30 +58,83 @@ EvtLoop
bne :1 bne :1
brl Exit brl Exit
:1 cmp #'l' tcounter dw 0
tileIDs dw 168,170,172,174,168,170,172,174
dw 169,171,173,175,169,171,173,175
dw 208,210,212,214,208,210,212,214
dw 209,211,213,215,209,211,213,215
;tileIDs dw 1,1,1,1,1,1,1,5
; dw 2,2,2,2,2,2,2,6
; dw 3,3,3,3,3,3,3,7
; dw 4,4,4,4,4,4,4,8
:1
cmp #'r'
bne EvtLoop
jsl DoTimers
inc tcounter
lda tcounter
and #$0007
asl
tay
lda tileIDs,y
pha
lda tileIDs+16,y
pha
lda tileIDs+32,y
pha
ldx tileIDs+48,y
inx
ldy #3
jsl CopyTileToDyn
plx
inx
ldy #2
jsl CopyTileToDyn
plx
inx
ldy #1
jsl CopyTileToDyn
plx
inx
ldy #0
jsl CopyTileToDyn
jsl Render
brl EvtLoop
cmp #'l'
bne :1_1 bne :1_1
jsr DoLoadFG jsr DoLoadFG
bra EvtLoop brl EvtLoop
:1_1 cmp #'b' :1_1 cmp #'b'
bne :2 bne :2
jsr DoLoadBG1 jsr DoLoadBG1
bra EvtLoop brl EvtLoop
:2 cmp #'m' :2 cmp #'m'
bne :3 bne :3
jsr DumpBanks jsr DumpBanks
bra EvtLoop brl EvtLoop
:3 cmp #'f' ; render a 'f'rame :3 cmp #'f' ; render a 'f'rame
bne :4 bne :4
jsl Render jsl Render
bra EvtLoop brl EvtLoop
:4 cmp #'h' ; Show the 'h'eads up display :4 cmp #'h' ; Show the 'h'eads up display
bne :5 bne :5
jsr DoHUP jsr DoHUP
bra EvtLoop brl EvtLoop
:5 cmp #'1' ; User selects a new screen size :5 cmp #'1' ; User selects a new screen size
bcc :6 bcc :6
@ -146,6 +203,8 @@ Exit
bcs Fatal bcs Fatal
Fatal brk $00 Fatal brk $00
MyPalette dw $0E51,$0EDA,$0000,$068F,$0BF1,$00A0,$0EEE,$0777,$0FA4,$0F59,$0F31,$02E3,$09B9,$01CE,$0EE6
StartMusic StartMusic
pea #^MusicFile pea #^MusicFile
pea #MusicFile pea #MusicFile
@ -454,6 +513,66 @@ qtRec adrl $0000
PUT gen/App.TileMapBG0.s PUT gen/App.TileMapBG0.s
PUT gen/App.TileMapBG1.s PUT gen/App.TileMapBG1.s
PUT gen/App.TileSetAnim.s

View File

@ -2,4 +2,36 @@
<tileset version="1.5" tiledversion="1.7.2" name="App.TileSet" tilewidth="8" tileheight="8" tilecount="1000" columns="40"> <tileset version="1.5" tiledversion="1.7.2" name="App.TileSet" tilewidth="8" tileheight="8" tilecount="1000" columns="40">
<transformations hflip="1" vflip="1" rotate="0" preferuntransformed="0"/> <transformations hflip="1" vflip="1" rotate="0" preferuntransformed="0"/>
<image source="../tilesets/smb-16.png" trans="6b8cff" width="320" height="200"/> <image source="../tilesets/smb-16.png" trans="6b8cff" width="320" height="200"/>
<tile id="168">
<animation>
<frame tileid="168" duration="256"/>
<frame tileid="170" duration="256"/>
<frame tileid="172" duration="256"/>
<frame tileid="174" duration="256"/>
</animation>
</tile>
<tile id="169">
<animation>
<frame tileid="169" duration="256"/>
<frame tileid="171" duration="256"/>
<frame tileid="173" duration="256"/>
<frame tileid="175" duration="256"/>
</animation>
</tile>
<tile id="208">
<animation>
<frame tileid="208" duration="256"/>
<frame tileid="210" duration="256"/>
<frame tileid="212" duration="256"/>
<frame tileid="214" duration="256"/>
</animation>
</tile>
<tile id="209">
<animation>
<frame tileid="209" duration="256"/>
<frame tileid="211" duration="256"/>
<frame tileid="213" duration="256"/>
<frame tileid="215" duration="256"/>
</animation>
</tile>
</tileset> </tileset>

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<export target="world_1-1.json" format="json"/> <export target="world_1-1.json" format="json"/>
</editorsettings> </editorsettings>
<tileset firstgid="1" source="Overworld.tsx"/> <tileset firstgid="1" source="Overworld.tsx"/>
<layer id="3" name="App.TileMapBG1" width="256" height="30" parallaxx="0.5" parallaxy="0.5"> <layer id="3" name="App.TileMapBG1" width="256" height="30" locked="1" parallaxx="0.5" parallaxy="0.5">
<data encoding="csv"> <data encoding="csv">
41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
@ -38,7 +38,7 @@
41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41 41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41
</data> </data>
</layer> </layer>
<layer id="1" name="App.TileMapBG0" width="256" height="30" visible="0" locked="1"> <layer id="1" name="App.TileMapBG0" width="256" height="30">
<data encoding="csv"> <data encoding="csv">
41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
@ -64,8 +64,8 @@
41,41,41,41,57,58,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,15,16,17,18,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,41,41,41,57,58,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,15,16,17,18,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
41,41,41,56,21,62,59,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,11,12,13,14,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,41,41,56,21,62,59,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,11,12,13,14,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
41,41,56,21,21,21,21,59,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,57,2147483705,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,15,16,17,18,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,41,56,21,21,21,21,59,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,57,2147483705,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,15,16,17,18,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
41,56,21,62,21,21,62,21,59,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,42,43,42,43,42,43,41,41,41,56,21,62,2147483704,41,41,41,41,41,41,41,41,41,41,41,42,43,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,42,43,42,43,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 41,56,21,62,21,21,62,21,59,41,41,41,169,170,169,170,169,170,169,170,169,170,41,41,42,43,42,43,42,43,41,41,41,56,21,62,2147483704,41,41,41,41,41,41,41,41,41,41,41,42,43,41,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,41,42,43,42,43,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
56,21,21,21,21,21,21,21,21,59,41,41,41,41,41,41,41,41,41,41,41,41,41,44,45,45,45,45,45,45,46,41,56,21,21,21,21,2147483704,41,41,41,41,41,41,41,41,41,44,45,45,46,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,44,45,45,45,45,46,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41, 56,21,21,21,21,21,21,21,21,59,41,41,209,210,209,210,209,210,209,210,209,210,41,44,45,45,45,45,45,45,46,41,56,21,21,21,21,2147483704,41,41,41,41,41,41,41,41,41,44,45,45,46,41,41,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,19,20,21,22,41,41,41,44,45,45,45,45,46,41,41,41,19,20,21,22,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,
1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,
3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4, 3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,3,4,
1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -112,11 +112,11 @@ App_TileMapBG0
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1029,$1038,$0015,$003e,$0015,$0015,$003e,$0015,$103b,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$102a,$102b,$102a,$102b,$102a,$102b,$1029,$1029,$1029,$1038,$0015,$003e,$1238,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$102a,$102b,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029 dw $1029,$1038,$0015,$003e,$0015,$0015,$003e,$0015,$103b,$1029,$1029,$1029,$0800,$0801,$0800,$0801,$0800,$0801,$0800,$0801,$0800,$0801,$1029,$1029,$102a,$102b,$102a,$102b,$102a,$102b,$1029,$1029,$1029,$1038,$0015,$003e,$1238,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$102a,$102b,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$102a,$102b,$102a,$102b,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$102a,$102b,$102a,$102b,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1038,$0015,$0015,$0015,$0015,$0015,$0015,$0015,$0015,$103b,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$102c,$002d,$002d,$002d,$002d,$002d,$002d,$102e,$1029,$1038,$0015,$0015,$0015,$0015,$1238,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$102c,$002d,$002d,$102e,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029 dw $1038,$0015,$0015,$0015,$0015,$0015,$0015,$0015,$0015,$103b,$1029,$1029,$0802,$0803,$0802,$0803,$0802,$0803,$0802,$0803,$0802,$0803,$1029,$102c,$002d,$002d,$002d,$002d,$002d,$002d,$102e,$1029,$1038,$0015,$0015,$0015,$0015,$1238,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$102c,$002d,$002d,$102e,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$102c,$002d,$002d,$002d,$002d,$102e,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$102c,$002d,$002d,$002d,$002d,$102e,$1029,$1029,$1029,$1013,$0014,$0015,$1016,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029
dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029 dw $1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029,$1029

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
TileAnimInit ENT
ldx #168
ldy #0
jsl CopyTileToDyn
ldx #169
ldy #1
jsl CopyTileToDyn
ldx #208
ldy #2
jsl CopyTileToDyn
ldx #209
ldy #3
jsl CopyTileToDyn
lda #TileAnim_168
ldx #^TileAnim_168
ldy #15
jsl StartScript
lda #TileAnim_169
ldx #^TileAnim_169
ldy #15
jsl StartScript
lda #TileAnim_208
ldx #^TileAnim_208
ldy #15
jsl StartScript
lda #TileAnim_209
ldx #^TileAnim_209
ldy #15
jsl StartScript
rts
TileAnim_168
dw $8006,168,0,0
dw $8006,170,0,0
dw $8006,172,0,0
dw $cd06,174,0,0
TileAnim_169
dw $8006,169,1,0
dw $8006,171,1,0
dw $8006,173,1,0
dw $cd06,175,1,0
TileAnim_208
dw $8006,208,2,0
dw $8006,210,2,0
dw $8006,212,2,0
dw $cd06,214,2,0
TileAnim_209
dw $8006,209,3,0
dw $8006,211,3,0
dw $8006,213,3,0
dw $cd06,215,3,0

View File

@ -24,7 +24,7 @@
"build:assets-woz-fatbits": "node %npm_package_config_png2iigs% ./assets/woz-pixelated.png ./emu/bg1a.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/donut-plains-1-6-color.png ./emu/fg1.bin", "build:assets-woz-fatbits": "node %npm_package_config_png2iigs% ./assets/woz-pixelated.png ./emu/bg1a.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/donut-plains-1-6-color.png ./emu/fg1.bin",
"build:assets-color-cycle": "node %npm_package_config_png2iigs% ./assets/rotopattern.png ./emu/bg1a.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/donut-plains-1-6-color.png ./emu/fg1.bin", "build:assets-color-cycle": "node %npm_package_config_png2iigs% ./assets/rotopattern.png ./emu/bg1a.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node %npm_package_config_png2iigs% ./assets/donut-plains-1-6-color.png ./emu/fg1.bin",
"build:map": "node %npm_package_config_tiled2iigs% ./assets/tiled/world_1-1.json --output-dir ./gen", "build:map": "node %npm_package_config_tiled2iigs% ./assets/tiled/world_1-1.json --output-dir ./gen",
"build:tiles": "node %npm_package_config_png2iigs% ./assets/tilesets/smb-16.png --as-tile-data --transparent-color-index 3 > ./gen/App.TileSet.s" "build:tiles": "node %npm_package_config_png2iigs% ./assets/tilesets/smb-16.png --max-tiles 224 --as-tile-data --transparent-color-index 3 > ./gen/App.TileSet.s"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -119,6 +119,15 @@ min mac
lda ]1 lda ]1
mout <<< mout <<<
; Macro to define script steps
ScriptStep MAC
IF #=]5
dw {]1+{{]5&#$000F}<<8}},]2,]3,]4
ELSE
dw ]1,]2,]3,]4
FIN
<<<
; Macros to use in the Masked Tile renderer ; Macros to use in the Masked Tile renderer
; ;
; ]1 : tiledata offset ; ]1 : tiledata offset
@ -174,3 +183,14 @@ transparent
sta: ]3+1,y sta: ]3+1,y
next next
eom eom

View File

@ -39,28 +39,12 @@ AnimatePath
; at a time . The slope of the lines are (X1 - X0) / Duration and (Y1 - Y0) / Duration. ; at a time . The slope of the lines are (X1 - X0) / Duration and (Y1 - Y0) / Duration.
; ;
; The tricky bit is that we *always* single-step in the "Y" direction (duration), so we ; The tricky bit is that we *always* single-step in the "Y" direction (duration), so we
; actaully need to use two differenct algorithms. ; actually need to use two differenct algorithms.
; ;
; If |X1 - X0| <= Duration, use a standard line-drawing approach (Bresenham's, DDA, etc.) ; If |X1 - X0| <= Duration, use a standard Bresenham's
; If |X1 - X0| > Duration, use the Run-Length Slice algorithm (https://www.phatcode.net/res/224/files/html/ch36/36-02.html) ; If |X1 - X0| > Duration, use the Run-Length Slice algorithm (https://www.phatcode.net/res/224/files/html/ch36/36-02.html)
lda AnimX1
lda AnimY lda AnimY
:stepx lda
cmp AnimDuration ; Handle the two cases cmp AnimDuration ; Handle the two cases

View File

@ -109,3 +109,13 @@ DIRTY_BIT_BG1_X equ $0004
DIRTY_BIT_BG1_Y equ $0008 DIRTY_BIT_BG1_Y equ $0008
DIRTY_BIT_BG0_REFRESH equ $0010 DIRTY_BIT_BG0_REFRESH equ $0010
DIRTY_BIT_BG1_REFRESH equ $0020 DIRTY_BIT_BG1_REFRESH equ $0020
; Script definition
YIELD equ $8000
JUMP equ $4000
SET_PALETTE_ENTRY equ $0002
SWAP_PALETTE_ENTRY equ $0004
SET_DYN_TILE equ $0006
CALLBACK equ $0010

View File

@ -7,12 +7,18 @@ EngineShutDown EXT
SetScreenMode EXT SetScreenMode EXT
ReadControl EXT ReadControl EXT
; Low-Level Functions
SetPalette EXT
GetVBLTicks EXT
; Tilemap functions
SetBG0XPos EXT SetBG0XPos EXT
SetBG0YPos EXT SetBG0YPos EXT
SetBG1XPos EXT SetBG1XPos EXT
SetBG1YPos EXT SetBG1YPos EXT
CopyBG0Tile EXT CopyBG0Tile EXT
CopyBG1Tile EXT CopyBG1Tile EXT
CopyTileToDyn EXT
Render EXT Render EXT
; Rotation ; Rotation
@ -40,3 +46,6 @@ ScreenAddr EXT
OneSecondCounter EXT OneSecondCounter EXT
BlitBuff EXT BlitBuff EXT

View File

@ -1,15 +1,15 @@
; Graphic screen initialization ; Graphic screen initialization
InitGraphics InitGraphics
jsr ShadowOn jsr _ShadowOn
jsr GrafOn jsr _GrafOn
lda #0 lda #0
jsr ClearToColor jsr _ClearToColor
lda #0 lda #0
jsr SetSCBs jsr _SetSCBs
ldx #DefaultPalette ldx #DefaultPalette
lda #0 lda #0
jsr SetPalette jsr _SetPalette
jsr _InitBG0 ; Initialize the background layers jsr _InitBG0 ; Initialize the background layers
jsr _InitBG1 jsr _InitBG1
@ -25,7 +25,7 @@ DefaultPalette dw $0000,$007F,$0090,$0FF0
dw $0d00,$078f,$0ccc,$0FFF dw $0d00,$078f,$0ccc,$0FFF
; Return the current border color ($0 - $F) in the accumulator ; Return the current border color ($0 - $F) in the accumulator
GetBorderColor lda #0000 _GetBorderColor lda #0000
sep #$20 sep #$20
ldal BORDER_REG ldal BORDER_REG
and #$0F and #$0F
@ -33,7 +33,11 @@ GetBorderColor lda #0000
rts rts
; Set the border color to the accumulator value. ; Set the border color to the accumulator value.
SetBorderColor sep #$20 ; ACC = $X_Y, REG = $W_Z SetBorderColor ENT
jsr _SetBorderColor
rtl
_SetBorderColor sep #$20 ; ACC = $X_Y, REG = $W_Z
eorl BORDER_REG ; ACC = $(X^Y)_(Y^Z) eorl BORDER_REG ; ACC = $(X^Y)_(Y^Z)
and #$0F ; ACC = $0_(Y^Z) and #$0F ; ACC = $0_(Y^Z)
eorl BORDER_REG ; ACC = $W_(Y^Z^Z) = $W_Y eorl BORDER_REG ; ACC = $W_(Y^Z^Z) = $W_Y
@ -42,7 +46,8 @@ SetBorderColor sep #$20 ; ACC = $X_Y, REG = $W_Z
rts rts
; Clear to SHR screen to a specific color ; Clear to SHR screen to a specific color
ClearToColor ldx #$7D00 ;start at top of pixel data! ($2000-9D00) _ClearToColor
ldx #$7D00 ;start at top of pixel data! ($2000-9D00)
:clearloop dex :clearloop dex
dex dex
stal SHR_SCREEN,x ;screen location stal SHR_SCREEN,x ;screen location
@ -50,8 +55,19 @@ ClearToColor ldx #$7D00 ;start at top of pixel data! ($2000-9
rts rts
; Set a palette values ; Set a palette values
; A = high word of palette data pointer, X = low word of palette data pointer, Y = palette number
SetPalette ENT
phb ; save old data bank
pha ; push 16-bit value
plb ; pop 8-bit bank register
tya
jsr _SetPalette
plb ; pop the other half og the 16-bit push off
plb ; restore the original data bank
rtl
; A = palette number, X = palette address ; A = palette number, X = palette address
SetPalette _SetPalette
and #$000F ; palette values are 0 - 15 and each palette is 32 bytes and #$000F ; palette values are 0 - 15 and each palette is 32 bytes
asl asl
asl asl
@ -70,7 +86,8 @@ SetPalette
rts rts
; Initialize the SCB ; Initialize the SCB
SetSCBs ldx #$0100 ;set all $100 scbs to A _SetSCBs
ldx #$0100 ;set all $100 scbs to A
:scbloop dex :scbloop dex
dex dex
stal SHR_SCB,x stal SHR_SCB,x
@ -78,34 +95,39 @@ SetSCBs ldx #$0100 ;set all $100 scbs to A
rts rts
; Turn SHR screen On/Off ; Turn SHR screen On/Off
GrafOn sep #$20 _GrafOn
sep #$20
lda #$81 lda #$81
stal NEW_VIDEO_REG stal NEW_VIDEO_REG
rep #$20 rep #$20
rts rts
GrafOff sep #$20 _GrafOff
sep #$20
lda #$01 lda #$01
stal NEW_VIDEO_REG stal NEW_VIDEO_REG
rep #$20 rep #$20
rts rts
; Enable/Disable Shadowing. ; Enable/Disable Shadowing.
ShadowOn sep #$20 _ShadowOn
sep #$20
ldal SHADOW_REG ldal SHADOW_REG
and #$F7 and #$F7
stal SHADOW_REG stal SHADOW_REG
rep #$20 rep #$20
rts rts
ShadowOff sep #$20 _ShadowOff
sep #$20
ldal SHADOW_REG ldal SHADOW_REG
ora #$08 ora #$08
stal SHADOW_REG stal SHADOW_REG
rep #$20 rep #$20
rts rts
GetVBL sep #$20 _GetVBL
sep #$20
ldal VBL_HORZ_REG ldal VBL_HORZ_REG
asl asl
ldal VBL_VERT_REG ldal VBL_VERT_REG
@ -114,10 +136,18 @@ GetVBL sep #$20
and #$00FF and #$00FF
rts rts
WaitForVBL sep #$20 _WaitForVBL
sep #$20
:wait1 ldal VBL_STATE_REG ; If we are already in VBL, then wait :wait1 ldal VBL_STATE_REG ; If we are already in VBL, then wait
bmi :wait1 bmi :wait1
:wait2 ldal VBL_STATE_REG :wait2 ldal VBL_STATE_REG
bpl :wait2 ; spin until transition into VBL bpl :wait2 ; spin until transition into VBL
rep #$20 rep #$20
rts rts

View File

@ -86,13 +86,13 @@ _Render
; The code fields are locked in now and reder to be rendered ; The code fields are locked in now and reder to be rendered
jsr ShadowOff jsr _ShadowOff
; ldx #0 ; Blit the full virtual buffer to the screen ; ldx #0 ; Blit the full virtual buffer to the screen
; ldy #8 ; ldy #8
; jsr _BltRange ; jsr _BltRange
jsr ShadowOn jsr _ShadowOn
; ldx #0 ; Expose the top 8 rows ; ldx #0 ; Expose the top 8 rows
; ldy #8 ; ldy #8
@ -124,3 +124,4 @@ _Render
stz DirtyBits stz DirtyBits
rts rts

View File

@ -9,7 +9,7 @@
; ;
; The COMMAND word has its bits defined as: ; The COMMAND word has its bits defined as:
; ;
; bit 15 = 1 if the end of a sequece ; bit 15 = 1 if the end of a sequence
; bit 14 = 0 proceed to next action, 1 jump ; bit 14 = 0 proceed to next action, 1 jump
; bit 13 = 0 (Reserved) ; bit 13 = 0 (Reserved)
; bit 12 = 0 (Reserved) ; bit 12 = 0 (Reserved)
@ -22,6 +22,7 @@
; ----------------------------------------------------- ; -----------------------------------------------------
; $0002 SET_PALETTE_ENTRY ADDR COLOR ---- : Set the palette entry at ARG1 to the color in ARG2 ; $0002 SET_PALETTE_ENTRY ADDR COLOR ---- : Set the palette entry at ARG1 to the color in ARG2
; $0004 SWAP_PALETTE_ENTRY ADDR1 ADDR2 ---- : Swap the palette entries in ADDR1 <-> ADDR2 ; $0004 SWAP_PALETTE_ENTRY ADDR1 ADDR2 ---- : Swap the palette entries in ADDR1 <-> ADDR2
; $0006 SET_DYN_TILE TILE_ID DTILE_ID ---- : Copy data from TileData into Dynamic Tile Area
; $0010 CALLBACK LONG_ADDR PARAM : Call a user-defined function (JSL) with a parameter value in accumulator ; $0010 CALLBACK LONG_ADDR PARAM : Call a user-defined function (JSL) with a parameter value in accumulator
; Start a new script ; Start a new script
@ -63,6 +64,11 @@ StartScript ENT
; This routine executes script command until it encounters one with the STOP bit set. In some ; This routine executes script command until it encounters one with the STOP bit set. In some
; sense, the stop bit acts like a "yield" in high-level languages. ; sense, the stop bit acts like a "yield" in high-level languages.
ARG1 equ 2
ARG2 equ 4
ARG3 equ 6
_DoScriptSeq _DoScriptSeq
phx ; save the timer index; will need to update user data at the end phx ; save the timer index; will need to update user data at the end
phb ; save the current data bank phb ; save the current data bank
@ -81,21 +87,26 @@ _DoScriptSeq
; exception is handling the JUMP bit which requires moving the script pc stored in the ; exception is handling the JUMP bit which requires moving the script pc stored in the
; x-register. ; x-register.
:loop phx ; Save the command address _dss_loop phx ; Save the command address
txy ; Cache in the y-register
lda: 0,x ; Load the command word lda: 0,x ; Load the command word
pha ; Stash it pha ; Stash it
and #$001E ; Only have 16 built-in command. Use the _UserCallback and #$001E ; Only have 16 built-in commands. Use the _UserCallback
tax ; command for custom functionality tax ; command for custom functionality
jsr (:commands,x) jmp (_dss_commands,x)
_dss_commands dw _Null,_SetPalEntry,_SwapPalEntry,_SetDTile,_Null,_Null,_Null,_Null
dw _UserCallback,_Null,_Null,_Null,_Null,_Null,_Null,_Null
_dss_cmd_rtn
lda 1,s ; Reload the command word lda 1,s ; Reload the command word
; Move to the next instruction. If the JUMP bit is set, we move the address forward or ; Move to the next instruction. If the JUMP bit is set, we move the address forward or
; backward N commands (8 bytes at a time). If the JUMP bit is not set, then just move ; backward N commands (8 bytes at a time). If the JUMP bit is not set, then just move
; to the next entry. ; to the next entry.
bit #$4000 ; Just do a fall through and set the jump offset to bit #JUMP ; Just do a fall through and set the jump offset to
bne :move_addr ; a hard-coded value of 1 if the jump bit is not set bne :move_addr ; a hard-coded value of 1 if the jump bit is not set
:retry lda #$0100 :retry lda #$0100
:move_addr and #$0F00 ; mask out the number of commands to move :move_addr and #$0F00 ; mask out the number of commands to move
@ -118,8 +129,8 @@ _DoScriptSeq
pla ; Reload the command word pla ; Reload the command word
plx ; Pop off the update command address plx ; Pop off the update command address
bit #$8000 ; If the stop bit is set, we're done with this sequence bit #YIELD ; If the stop bit is set, we're done with this sequence
beq :loop ; Otherwise, keep going and fetch the next command word beq _dss_loop ; Otherwise, keep going and fetch the next command word
txa ; save the current command address txa ; save the current command address
plb ; restore the data bank and the timer index plb ; restore the data bank and the timer index
@ -128,25 +139,16 @@ _DoScriptSeq
rtl rtl
:commands dw _Null,_SetPalEntry,_SwapPalEntry,_Null,_Null,_Null,_Null,_Null
dw _UserCallback,_Null,_Null,_Null,_Null,_Null,_Null,_Null
ARG1 equ 2
ARG2 equ 4
ARG3 equ 6
; Implementation of the built-in commands ; Implementation of the built-in commands
_Null rts _Null brl _dss_cmd_rtn
_SetPalEntry _SetPalEntry
txy
ldx: ARG1,y ldx: ARG1,y
lda: ARG2,y lda: ARG2,y
stal SHR_PALETTES,x stal SHR_PALETTES,x
rts brl _dss_cmd_rtn
_SwapPalEntry txy
_SwapPalEntry
ldx: ARG1,y ; Load palette values ldx: ARG1,y ; Load palette values
ldal SHR_PALETTES,x ldal SHR_PALETTES,x
pha pha
@ -159,14 +161,25 @@ _SwapPalEntry txy
ldx: ARG2,y ldx: ARG2,y
pla pla
stal SHR_PALETTES,x stal SHR_PALETTES,x
rts brl _dss_cmd_rtn
_UserCallback lda: ARG1,x _SetDTile
ldx: ARG1,y
lda: ARG2,y
tay
jsl CopyTileToDyn
brl _dss_cmd_rtn
_UserCallback
lda: ARG1,y
sta :dispatch+1 sta :dispatch+1
lda: ARG1+1,x lda: ARG1+1,y
sta :dispatch+2 sta :dispatch+2
lda: ARG3,x lda: ARG3,y
:dispatch jsl $000000 :dispatch jsl $000000
rts brl _dss_cmd_rtn

View File

@ -316,7 +316,7 @@ _UpdateBG0TileMap
; Handle fringe tiles -- if the fringe bit is set, then we need to get the fringe tile index ; Handle fringe tiles -- if the fringe bit is set, then we need to get the fringe tile index
; and merge the tiles before rendering ; and merge the tiles before rendering
bit #$TILE_FRINGE_BIT bit #TILE_FRINGE_BIT
beq :no_fringe beq :no_fringe
jsr _GetTileAddr jsr _GetTileAddr
tax tax
@ -675,3 +675,4 @@ _DrawRectBG1
pla pla
rts rts

View File

@ -29,6 +29,9 @@ TIMER_REC_SIZE equ 16
lastTick ds 2 lastTick ds 2
Timers ds TIMER_REC_SIZE*MAX_TIMERS Timers ds TIMER_REC_SIZE*MAX_TIMERS
GetVBLTicks ENT
jsr _GetVBLTicks
rtl
_GetVBLTicks _GetVBLTicks
PushLong #0 PushLong #0
_GetTick _GetTick
@ -150,6 +153,12 @@ DoTimers ENT
sec sec
sbc lastTick sbc lastTick
stx lastTick stx lastTick
; We don't want times to fire excessively. If the timer has nt been evaluated for over
; one second, then just skip processing and wait for the next call.
cmp #60
bcs :exit
jsr _DoTimers jsr _DoTimers
:exit plb :exit plb
@ -196,9 +205,9 @@ _DoTimers
:skip txa :skip txa
clc clc
adc #8 adc #TIMER_REC_SIZE
tax tax
cpx #8*MAX_TIMERS cpx #{TIMER_REC_SIZE*MAX_TIMERS}
bcc :loop bcc :loop
pla pla
@ -227,6 +236,24 @@ _DoTimers

View File

@ -118,7 +118,7 @@ SetScreenRect sty ScreenHeight ; Save the screen height
; Clear the SHR screen and then infill the defined field ; Clear the SHR screen and then infill the defined field
FillScreen lda #0 FillScreen lda #0
jsr ClearToColor jsr _ClearToColor
ldy ScreenY0 ldy ScreenY0
:yloop :yloop
@ -272,6 +272,48 @@ SetConst ; Need a blank line here,
sta: $0000,y sta: $0000,y
:bottom rts :bottom rts
; SetDPAddrs
;
; A = absolute address (largest)
; Y = offset
;
; Initializes a bank of direct page offsets
SetDPAddrs
lda #$0800
sta $F000,y
lda #$0700
sta $E000,y
lda #$0600
sta $D000,y
lda #$0500
sta $C000,y
lda #$0400
sta $B000,y
lda #$0300
sta $A000,y
lda #$0200
sta $9000,y
lda #$0100
sta: $8000,y
lda #$0800
sta $7000,y
lda #$0700
sta $6000,y
lda #$0600
sta $5000,y
lda #$0500
sta $4000,y
lda #$0400
sta $3000,y
lda #$0300
sta $2000,y
lda #$0200
sta $1000,y
lda #$0100
sta: $0000,y
rts
; SetAbsAddrs ; SetAbsAddrs
; ;
; A = absolute address (largest) ; A = absolute address (largest)
@ -361,11 +403,17 @@ BuildBank
plb plb
plb plb
lda #$F000+{TWO_LYR_ENTRY} ; Set the address from each line to the next ; Change the patched value to one of DP_ENTRY, TWO_LYR_ENTRY or ONE_LYR_ENTRY based on the capabilities
; that the engine needs.
lda #$F000+{DP_ENTRY} ; Set the address from each line to the next
ldy #CODE_EXIT+1 ldy #CODE_EXIT+1
ldx #15*2 ldx #15*2
jsr SetAbsAddrs jsr SetAbsAddrs
ldy #DP_ADDR
jsr SetDPAddrs
ldy #$F000+CODE_EXIT ; Patch the last line with a JML to go to the next bank ldy #$F000+CODE_EXIT ; Patch the last line with a JML to go to the next bank
lda #{$005C+{TWO_LYR_ENTRY}*256} lda #{$005C+{TWO_LYR_ENTRY}*256}
sta [:target],y sta [:target],y
@ -480,7 +528,7 @@ odd_entry jmp $0100 ; unconditionally jump in
r_is_jmp sep #$41 ; Set the C and V flags which tells a snippet to push only the low byte r_is_jmp sep #$41 ; Set the C and V flags which tells a snippet to push only the low byte
long_2 ldal entry_jmp+1-base long_2 ldal entry_jmp+1-base
long_3 stal *+5-base long_3 stal *+5-base
jmp $0000 ; Jumps into the exception code, which return to r_jmp_rtn jmp $0000 ; Jumps into the exception code, which returns to r_jmp_rtn
; The next labels are special, in that they are entry points into special subroutines. They are special ; The next labels are special, in that they are entry points into special subroutines. They are special
; because they are within the first 256 bytes of each code field, which allows them to be selectable ; because they are within the first 256 bytes of each code field, which allows them to be selectable
@ -530,7 +578,7 @@ odd_exit ldal l_is_jmp+1-base
sep #$20 sep #$20
long_6 ldal l_is_jmp+3-base ; get the high byte of the PEA operand long_6 ldal l_is_jmp+3-base ; get the high byte of the PEA operand
; Fall-through when we have to push a byte on the left edge. Must be 8-bit on entry. Optimize ; Fall-through when we have to push a byte on the left edge. Must be 8-bit on entry. Optimized
; for the PEA $0000 case -- only 19 cycles to handle the edge, so pretty good ; for the PEA $0000 case -- only 19 cycles to handle the edge, so pretty good
:left_byte :left_byte
pha pha
@ -580,7 +628,7 @@ epilogue_1 tsc
; a. Overflow set -> Low 8-bit write and return to the next code field operand ; a. Overflow set -> Low 8-bit write and return to the next code field operand
; b. Overflow clear -> High 8-bit write and exit the line ; b. Overflow clear -> High 8-bit write and exit the line
; c. Always clear the Carry flags. It's actually OK to leave the overflow bit in ; c. Always clear the Carry flags. It's actually OK to leave the overflow bit in
; its passed state, because having the carry bit clear prevent evaluation of ; its passed state, because having the carry bit clear prevents evaluation of
; the V bit. ; the V bit.
; ;
; Snippet Samples: ; Snippet Samples:
@ -637,3 +685,11 @@ snippets lup 82
]index equ ]index+1 ]index equ ]index+1
--^ --^
top top

View File

@ -48,7 +48,7 @@ TILE_CTRL_MASK equ $1E00 ; Deliberatel
; Low-level function to take a tile descriptor and return the address in the tiledata ; Low-level function to take a tile descriptor and return the address in the tiledata
; bank. This is not too useful in the fast-path because the fast-path does more ; bank. This is not too useful in the fast-path because the fast-path does more
; incremental calculations, but it is handy for other utilitiy function ; incremental calculations, but it is handy for other utility functions
; ;
; A = tile descriptor ; A = tile descriptor
; ;
@ -58,7 +58,7 @@ _GetTileAddr
bit #2*TILE_HFLIP_BIT ; Check if the horizontal flip bit is set bit #2*TILE_HFLIP_BIT ; Check if the horizontal flip bit is set
beq :no_flip beq :no_flip
inc ; Set the LSB inc ; Set the LSB
:no_flip and #$02FF ; Mask out non-id bits :no_flip and #TILE_ID_MASK ; Mask out non-id bits
asl ; x4 asl ; x4
asl ; x8 asl ; x8
asl ; x16 asl ; x16
@ -529,7 +529,24 @@ DynamicTile
rep #$20 rep #$20
rts rts
; Helper function to copy tile data to the appropriate location in Bank 0 ; Helper functions to copy tile data to the appropriate location in Bank 0
; X = tile ID
; Y = dynamic tile ID
CopyTileToDyn ENT
txa
jsr _GetTileAddr
tax
tya
and #$001F ; Maximum of 32 dynamic tiles
asl
asl ; 4 bytes per page
adc BlitterDP ; Add to the bank 00 base address
adc #$0100 ; Go to the next page
tay
jsr CopyTileDToDyn ; Copy the tile data
rtl
; X = address of tile ; X = address of tile
; Y = tile address in bank 0 ; Y = tile address in bank 0
CopyTileDToDyn CopyTileDToDyn
@ -681,7 +698,8 @@ dynamic
pla pla
asl asl
asl asl
xba ; Undo the x128 we just need x2 asl
xba ; Undo the x128 we just need x4
plx plx
brl DynamicTile brl DynamicTile
@ -824,3 +842,21 @@ _CopyBG1Tile
plx ; pop the x-register plx ; pop the x-register
plb ; restore the data bank and return plb ; restore the data bank and return
rts rts

View File

@ -133,6 +133,7 @@ async function main(argv) {
startIndex = getArg(argv, '--start-index', x => parseInt(x, 10), 0); startIndex = getArg(argv, '--start-index', x => parseInt(x, 10), 0);
asTileData = getArg(argv, '--as-tile-data', null, 0); asTileData = getArg(argv, '--as-tile-data', null, 0);
maxTiles = getArg(argv, '--max-tiles', x => parseInt(x, 10), 64);
transparentColor = getArg(argv, '--transparent-color-index', x => parseInt(x, 10), -1); transparentColor = getArg(argv, '--transparent-color-index', x => parseInt(x, 10), -1);
transparentIndex = transparentColor; transparentIndex = transparentColor;
@ -175,7 +176,7 @@ async function main(argv) {
if (buff && argv[1]) { if (buff && argv[1]) {
if (asTileData) { if (asTileData) {
writeToTileDataSource(buff, png.width / 2); writeToTileDataSource(buff, png.width / 2, maxTiles);
} }
else { else {
console.log(`; Writing to output file ${argv[1]}`); console.log(`; Writing to output file ${argv[1]}`);
@ -355,14 +356,12 @@ function buildMerlinCodeForTiles(tiles, label='tiledata') {
return sb.toString(); return sb.toString();
} }
function writeToTileDataSource(buff, width) { function writeToTileDataSource(buff, width, MAX_TILES = 64) {
console.log('tiledata ENT'); console.log('tiledata ENT');
console.log(); console.log();
console.log('; Reserved space (tile 0 is special...'); console.log('; Reserved space (tile 0 is special...');
console.log(' ds 128'); console.log(' ds 128');
const MAX_TILES = 64;
let count = 0; let count = 0;
for (let y = 0; ; y += 8) { for (let y = 0; ; y += 8) {
for (let x = 0; x < width; x += 4, count += 1) { for (let x = 0; x < width; x += 4, count += 1) {

View File

@ -102,7 +102,7 @@ function writeTileAnimations(filename, animations) {
// Create code to copy it into the dynamic tile index location // Create code to copy it into the dynamic tile index location
init.appendLine(' ldx #' + firstTileId); init.appendLine(' ldx #' + firstTileId);
init.appendLine(' ldy #' + animation.dynTileId); init.appendLine(' ldy #' + animation.dynTileId);
init.appendLine(' jsr CopyTileToDyn'); init.appendLine(' jsl CopyTileToDyn');
} }
// Next, create the scripts to change the tile data based on the configured ticks delays. // Next, create the scripts to change the tile data based on the configured ticks delays.
@ -122,13 +122,30 @@ function writeTileAnimations(filename, animations) {
init.appendLine(` ldy #${numTicks}`); init.appendLine(` ldy #${numTicks}`);
init.appendLine(` jsl StartScript`); init.appendLine(` jsl StartScript`);
scripts.appendLine(label); // bit 15 = 1 if the end of a sequence
for (let i = 0; i < frames.length ; i += 1) { // bit 14 = 0 proceed to next action, 1 jump
const last = (i === (frames.length - 1)); // bit 13 = 0 (Reserved)
const command = 'YIELD+SET_DYN_TILE' + (last ? '+JUMP' : ''); // bit 12 = 0 (Reserved)
const jump = last ? `,-${frames.length - 1}` : ''; // bit 11 - 8 = signed jump displacement F = -1, E = -2, D = -3, C = -4, B = -5, A = -6, 9 = -7, 8 = -8, 7 = 7, 6 = 6, ....
// bit 8 - 0 = command number
const YIELD = 0x8000;
const JUMP = 0x4000;
const SET_DYN_TILE = 0x0006; // Command number
scripts.appendLine(` dw ${command},${frames[i].tileId},${animation.dynTileId}${jump}`); scripts.appendLine(label);
const lastValidIndex = frames.length - 1;
for (let i = 0; i < frames.length ; i += 1) {
const isLast = (i === lastValidIndex);
let command = YIELD | SET_DYN_TILE;
if (isLast) {
command |= JUMP;
const offset = ((0x0010 - lastValidIndex) & 0x000F) * 256;
command |= offset;
}
command = '$' + toHex(command, 4);
// scripts.appendLine(` ScriptStep #${command};#${frames[i].tileId};#${animation.dynTileId};#0`);
scripts.appendLine(` dw ${command},${frames[i].tileId},${animation.dynTileId},0`);
} }
} }
@ -246,7 +263,7 @@ async function main(argv) {
// Look for tiles with animation sequences. If found, this information need to be propagated // Look for tiles with animation sequences. If found, this information need to be propagated
// to the tilemap export to mark those tile IDs as Dynamic Tiles. // to the tilemap export to mark those tile IDs as Dynamic Tiles.
// //
// Exporting the "animations" actually created two code stubs; one to copy the first // Exporting the "animations" actually creates two code stubs; one to copy the first
// tile of the animation into the dynamic tile space during initialization and a second // tile of the animation into the dynamic tile space during initialization and a second
// that created the timer callbacks that replace the tile data based on the time animation // that created the timer callbacks that replace the tile data based on the time animation
// rate. We only have a VBL timer, so the animation time is rounded to the nearest // rate. We only have a VBL timer, so the animation time is rounded to the nearest
@ -257,7 +274,12 @@ async function main(argv) {
writeTileAnimations(animationFilename, animations); writeTileAnimations(animationFilename, animations);
console.log(`Writing complete`); console.log(`Writing complete`);
// Modify the entries in the tileset that are animated
for (const animation of animations) {
tiles[animation.tileId].animation = animation;
} }
}
bg0TileSet = tiles; bg0TileSet = tiles;
} }
@ -351,6 +373,7 @@ function emitLayerData(sb, layer, tileset) {
*/ */
function convertTileID(tileId, tileset) { function convertTileID(tileId, tileset) {
const GTE_MASK_BIT = 0x1000; const GTE_MASK_BIT = 0x1000;
const GTE_DYN_BIT = 0x0800;
const GTE_VFLIP_BIT = 0x0400; const GTE_VFLIP_BIT = 0x0400;
const GTE_HFLIP_BIT = 0x0200; const GTE_HFLIP_BIT = 0x0200;
const TILED_VFLIP_BIT = 0x40000000; const TILED_VFLIP_BIT = 0x40000000;
@ -375,5 +398,16 @@ function convertTileID(tileId, tileset) {
// because a special zero tile is inserted, but we have to manually adjust here // because a special zero tile is inserted, but we have to manually adjust here
const mask_bit = !tileset[tileIndex - 1].isSolid; const mask_bit = !tileset[tileIndex - 1].isSolid;
return (tileId & 0x1FFFFFFF) + (mask_bit ? GTE_MASK_BIT : 0) + (hflip ? GTE_HFLIP_BIT : 0) + (vflip ? GTE_VFLIP_BIT : 0); // Build up a partial set of control bits
let control_bits = (mask_bit ? GTE_MASK_BIT : 0) + (hflip ? GTE_HFLIP_BIT : 0) + (vflip ? GTE_VFLIP_BIT : 0);
// Check if this is an animated tile. If so, substitute the index of the animation slot for
// the tile ID
if (tileset[tileIndex - 1].animation) {
const animation = tileset[tileIndex - 1].animation;
tileId = animation.dynTileId;
control_bits = GTE_DYN_BIT;
}
return (tileId & 0x1FFFFFFF) + control_bits;
} }