KFest Demos

This commit is contained in:
Lucas Scharenbroich 2022-07-13 08:57:05 -05:00
parent d7c0577167
commit 1b7c2c22b1
12 changed files with 539 additions and 10 deletions

View File

@ -0,0 +1,99 @@
; Shared subroutines for all demos
;
; Load the GTE User Tool and install it
;
; A = Engine Mode
GTEStartUp
pha ; Save engine mode
pea $0000
_LoaderStatus
pla
pea $0000
pea $0000
pea $0000
pea $0000
pea $0000 ; result space
lda MyUserId
pha
pea #^ToolPath
pea #ToolPath
pea $0001 ; do not load into special memory
_InitialLoad
bcc *+4
brk $01
ply
pla ; Address of the loaded tool
plx
ply
ply
pea $8000 ; User toolset
pea $00A0 ; Set the tool set number
phx
pha ; Address of function pointer table
_SetTSPtr
bcc *+4
brk $02
plx ; Pop the Engine Mode value
clc ; Give GTE a page of direct page memory
tdc
adc #$0100
pha
phx
lda MyUserId ; Pass the userId for memory allocation
pha
_GTEStartUp
bcc *+4
brk $03
rts
ToolPath str '1/Tool160'
; Generic key handling common to all demos
;
; A = result from GTEReadControl (preserved)
; C = 1 if not handled
; C = 0 if handled
HandleKeys
pha
and #$007F
cmp #'q'
bne :not_q
lda #Exit-1 ; replace the return address with the exit
sta 1,s
rts
:not_q
cmp #'1'
bcc :not_digit
cmp #':' ; next character after '9'
bcs :not_digit
sec
sbc #'1'
pha
pea $0000
_GTESetScreenMode
_GTERefresh
jsr SetLimits
bra :handled
:not_digit
bra :unhandled
:handled pla
clc
rts
:unhandled pla
sec
rts

View File

@ -0,0 +1,243 @@
; Test driver to exercise graphics routines.
REL
DSK MAINSEG
use Locator.Macs
use Load.Macs
use Mem.Macs
use Misc.Macs
use Util.Macs
use EDS.GSOS.Macs
use GTE.Macs
mx %00
tiledata EXT ; tileset buffer
TileSetPalette EXT
; Keycodes
LEFT_ARROW equ $08
RIGHT_ARROW equ $15
UP_ARROW equ $0B
DOWN_ARROW equ $0A
; Direct page space
MyUserId equ 0
BankLoad equ 2
StartX equ 4
StartY equ 6
TileMapWidth equ 8
TileMapHeight equ 10
ScreenWidth equ 12
ScreenHeight equ 14
MaxGlobalX equ 16
MaxGlobalY equ 18
MaxBG0X equ 20
MaxBG0Y equ 22
OldOneSecondCounter equ 26
appTmp0 equ 28
phk
plb
sta MyUserId ; GS/OS passes the memory manager user ID for the application into the program
tdc
sta MyDirectPage ; Keep a copy for the overlay callback
_MTStartUp ; GTE requires the miscellaneous toolset to be running
lda #0 ; Engine in Fast Mode
jsr GTEStartUp ; Load and install the GTE User Tool
; Initialize local variables
stz StartX
stz StartY
stz frameCount
; Initialize the graphics screen playfield
pea #320
pea #200
_GTESetScreenMode
; Load a tileset
pea #^tiledata
pea #tiledata
_GTELoadTileSet
pea $0000
pea #^TileSetPalette
pea #TileSetPalette
_GTESetPalette
; Set up our level data
jsr BG0SetUp
jsr SetLimits
jsr InitOverlay ; Initialize the status bar
pha
_GTEGetSeconds
pla
sta OldOneSecondCounter
jsr UdtOverlay
; Set up a very specific test. First, we draw a sprite into the sprite plane, and then
; leave it alone. We are just testing the ability to merge sprite plane data into
; the play field tiles.
EvtLoop
pha
_GTEReadControl
pla
jsr HandleKeys ; Do the generic key handlers
bcs :do_more
brl :do_render
:do_more
cmp #'d'
bne :not_d
lda StartX
cmp MaxBG0X
bcc *+5
brl :do_render
inc StartX
pei StartX
pei StartY
_GTESetBG0Origin
brl :do_render
:not_d
cmp #'a'
bne :not_a
lda StartX
bne *+5
brl :do_render
dec StartX
pei StartX
pei StartY
_GTESetBG0Origin
brl :do_render
:not_a
cmp #'s'
bne :not_s
lda StartY
cmp MaxBG0Y
bcs :do_render
inc StartY
pei StartX
pei StartY
_GTESetBG0Origin
bra :do_render
:not_s
cmp #'w'
bne :not_w
lda StartY
beq :do_render
dec StartY
pei StartX
pei StartY
_GTESetBG0Origin
bra :do_render
:not_w
:do_render
_GTERender
; Update the performance counters
inc frameCount
pha
_GTEGetSeconds
pla
cmp OldOneSecondCounter
beq :noudt
sta OldOneSecondCounter
jsr UdtOverlay
stz frameCount
:noudt
brl EvtLoop
; Exit code
Exit
_GTEShutDown
Quit
_QuitGS qtRec
bcs Fatal
Fatal brk $00
qtRec adrl $0000
da $00
; Color palette
MyDirectPage ds 2
SetLimits
pha ; Allocate space for width (in tiles), height (in tiles), pointer
pha
pha
pha
_GTEGetBG0TileMapInfo
pla
sta TileMapWidth
pla
sta TileMapHeight
pla
pla ; discard the pointer
pha ; Allocate space for x, y, width, height
pha
pha
pha
_GTEGetScreenInfo
pla
pla ; Discard screen corner
pla
sta ScreenWidth
pla
sta ScreenHeight
lda TileMapWidth
asl
asl
sta MaxGlobalX
sec
sbc ScreenWidth
sta MaxBG0X
lda TileMapHeight
asl
asl
asl
sta MaxGlobalY
sec
sbc ScreenHeight
sta MaxBG0Y
; Check if the current StartX and StartY are out of bounds
lda StartX
cmp MaxBG0X
bcc :x_ok
lda MaxBG0X
:x_ok pha
lda StartY
cmp MaxBG0Y
bcc :y_ok
lda MaxBG0Y
:y_ok pha
_GTESetBG0Origin
rts
frameCount equ 24
PUT ../StartUp.s
PUT ../../shell/Overlay.s
PUT gen/App.TileMapBG0.s

View File

@ -0,0 +1,15 @@
; KFest 2022: Demo #1
TYP $B3 ; S16 file
DSK GTEDemo1
XPL
; Segment #1 -- Main execution block
ASM App.Main.s
SNA Main
; Segment #2 -- Tileset
ASM gen\App.TileSet.s
SNA TSET

View File

@ -0,0 +1,3 @@
Basic scroller with SMB background
- q to quit; arrows to scroll, numbers to select screen size
- make sure Overlay is present

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.7.2" name="App.TileSet" tilewidth="8" tileheight="8" tilecount="512" columns="32">
<transformations hflip="1" vflip="1" rotate="0" preferuntransformed="0"/>
<image source="../tilesets/smb-256-128-4bpp.png" trans="ff00ff" width="256" height="128"/>
<tile id="136">
<animation>
<frame tileid="136" duration="256"/>
<frame tileid="138" duration="256"/>
<frame tileid="140" duration="256"/>
<frame tileid="142" duration="256"/>
</animation>
</tile>
<tile id="137">
<animation>
<frame tileid="137" duration="256"/>
<frame tileid="139" duration="256"/>
<frame tileid="141" duration="256"/>
<frame tileid="143" duration="256"/>
</animation>
</tile>
<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>
</tileset>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.7.2" orientation="orthogonal" renderorder="right-down" width="416" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="4" nextobjectid="2">
<editorsettings>
<export target="world_1-1.json" format="json"/>
</editorsettings>
<tileset firstgid="1" source="Overworld.tsx"/>
<layer id="1" name="App.TileMapBG0" width="416" height="30">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,185,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,153,154,153,154,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,153,154,153,154,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,153,154,153,154,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,153,154,153,154,153,154,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,56,10,0,0,0,0,0,153,154,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,186,186,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,186,186,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,186,186,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,185,186,186,186,186,186,186,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,10,0,0,0,0,185,186,186,187,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,157,156,157,156,157,158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,0,0,0,0,155,156,157,158,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,7,8,7,8,7,8,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,0,0,0,0,0,0,0,0,31,32,31,32,31,32,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,159,160,0,0,0,0,0,188,188,159,160,188,188,159,160,188,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,12,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,12,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,188,159,160,188,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,188,0,0,0,0,0,0,0,0,0,0,188,188,188,188,0,0,0,0,0,0,0,0,159,160,0,0,0,0,159,160,0,0,0,0,159,160,0,0,0,0,0,0,0,0,0,0,188,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,188,188,188,0,0,0,0,0,0,0,0,0,0,0,0,5,6,0,0,0,0,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,5,6,0,0,0,0,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,188,188,188,159,160,188,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,5,6,5,6,5,6,5,6,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,0,0,0,0,0,0,0,0,26,26,26,26,26,26,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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6,5,6,5,6,0,0,0,0,0,0,0,0,0,0,11,12,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,12,13,14,0,0,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,0,0,0,0,0,0,0,48,21,54,51,0,0,0,0,0,9,10,0,0,0,0,0,0,26,26,26,26,57,58,26,26,26,26,0,0,
0,0,48,21,21,21,21,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,2147483697,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,16,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,22,0,0,48,21,21,21,21,51,0,0,0,0,0,0,0,0,0,0,19,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0,49,2147483697,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,21,21,21,21,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,2147483697,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,7,8,7,8,0,0,0,0,7,8,7,8,7,8,0,0,0,0,48,21,21,21,21,51,0,0,7,8,7,8,7,8,7,8,0,0,0,0,7,8,7,8,7,8,0,0,0,0,0,0,49,2147483697,0,0,15,16,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,16,17,18,0,0,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,0,0,0,0,0,0,48,21,21,21,21,51,0,0,0,0,9,10,0,0,0,0,0,0,26,26,26,26,64,64,26,26,26,26,0,0,
0,48,21,54,21,21,54,21,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,35,34,35,34,35,0,0,0,48,21,54,2147483696,0,0,0,0,0,0,0,0,0,0,0,34,35,0,0,0,0,0,0,19,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,22,0,0,0,0,34,35,34,35,0,0,0,0,19,20,21,22,0,48,21,54,21,21,54,21,51,0,0,0,0,0,0,0,0,0,19,20,21,22,0,0,34,35,34,35,34,35,0,0,0,48,21,54,2147483696,0,0,0,0,0,0,0,0,0,0,0,34,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,35,34,35,0,0,0,0,0,0,0,0,0,48,21,54,21,21,54,21,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,35,34,35,34,35,0,0,0,48,21,54,2147483696,0,0,0,0,0,0,0,0,0,0,0,34,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,5,6,5,6,5,6,34,35,34,35,5,6,5,6,5,6,5,6,0,48,21,54,21,21,54,21,5,6,5,6,5,6,5,6,5,6,0,0,0,0,5,6,5,6,5,6,5,6,0,0,0,48,21,54,2147483696,0,19,20,21,22,0,0,0,0,0,0,34,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,22,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,5,6,0,0,0,0,0,48,21,54,21,21,54,21,51,0,0,0,5,6,0,0,0,0,0,0,26,26,26,26,64,64,26,26,26,26,0,0,
48,21,21,21,21,21,21,21,21,51,0,0,0,0,0,0,0,0,0,0,0,0,0,36,37,37,37,37,37,37,38,0,48,21,21,21,21,2147483696,0,0,0,0,0,0,0,0,0,36,37,37,38,0,0,0,0,0,19,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,22,0,0,0,36,37,37,37,37,38,0,0,0,19,20,21,22,48,21,21,21,21,21,21,21,21,51,0,0,0,0,0,0,0,0,19,20,21,22,0,36,37,37,37,37,37,37,38,0,48,21,21,21,21,2147483696,0,0,0,0,0,0,0,0,0,36,37,37,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,37,37,37,37,38,0,0,0,0,0,0,0,48,21,21,21,21,21,21,21,21,51,0,0,0,0,0,0,0,0,0,0,0,0,0,36,37,37,37,37,37,37,38,0,48,21,21,21,21,2147483696,0,0,0,0,0,0,0,0,0,36,37,37,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,7,8,7,8,7,8,37,37,37,37,7,8,7,8,7,8,7,8,48,21,21,21,21,21,21,21,7,8,7,8,7,8,7,8,7,8,0,0,0,0,7,8,7,8,7,8,7,8,38,0,48,21,21,21,21,2147483696,19,20,21,22,0,0,0,0,0,36,37,37,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,22,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,7,8,0,0,0,0,48,21,21,21,21,21,21,21,21,51,0,0,7,8,0,0,0,0,0,0,26,26,26,26,64,64,26,26,26,26,0,0,
1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,0,0,0,0,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,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o off
REM Copy all of the assets into the ProDOS image for emulator testing
REM
REM Pass the path of the Cadius tool as the first argument (%1)
set CADIUS="%1"
set IMAGE="..\\..\\..\\emu\\Target.2mg"
set FOLDER="/GTEDEV/KFestDemo01"
REM Cadius does not overwrite files, so clear the root folder first
%CADIUS% DELETEFOLDER %IMAGE% %FOLDER%
%CADIUS% CREATEFOLDER %IMAGE% %FOLDER%
REM Now copy files and folders as needed
%CADIUS% ADDFILE %IMAGE% %FOLDER% .\GTEDemo1
%CADIUS% ADDFILE %IMAGE% %FOLDER% ..\..\..\src\Tool160

View File

@ -0,0 +1,44 @@
{
"name": "kfest-demo-1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"config": {
"merlin32": "C:\\Programs\\IIgsXDev\\bin\\Merlin32-1.1.10.exe",
"cadius": "C:\\Programs\\IIgsXDev\\bin\\Cadius.exe",
"gsport": "C:\\Programs\\gsport\\gsport_0.31\\GSPort.exe",
"macros": "../../../macros",
"crossrunner": "C:\\Programs\\Crossrunner\\Crossrunner.exe",
"png2iigs": "../../../tools/png2iigs.js",
"tiled2iigs": "../../../tools/tiled2iigs.js"
},
"scripts": {
"test": "npm run build && npm run build:image && npm run gsport",
"gsport": "%npm_package_config_gsport%",
"debug": "%npm_package_config_crossrunner% GTETestSprites -Source GTETestSprites_S02_MAINSEG_Output.txt -Debug -CompatibilityLayer",
"build:all": "npm run build:tiles && npm run build:map && npm run build:tool && npm run build:sys16 && npm run build:image",
"build:map": "node %npm_package_config_tiled2iigs% ./assets/tiled/world_1-1.json --empty-tile 33 --no-gen-tiles --output-dir ./gen",
"build:map:masked": "node %npm_package_config_tiled2iigs% ./assets/tiled/world_1-1.json --force-masked --empty-tile 33 --no-gen-tiles --output-dir ./gen",
"build:tiles": "node %npm_package_config_png2iigs% ./assets/tilesets/smb-256-128-4bpp.png --max-tiles 360 --as-tile-data --transparent-color FF00FF --background-color 6B8CFF > ./gen/App.TileSet.s",
"build:sys16": "%npm_package_config_merlin32% -V %npm_package_config_macros% App.s",
"build": "npm run build:tool && npm run build:sys16",
"build:tool": "%npm_package_config_merlin32% -V %npm_package_config_macros% ../../../src/Master.s",
"build:image": "build-image.bat %npm_package_config_cadius%"
},
"repository": {
"type": "git",
"url": "git+https://github.com/lscharen/iigs-game-engine.git"
},
"author": "Lucas Scharenbroich",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/lscharen/iigs-game-engine/issues"
},
"homepage": "https://github.com/lscharen/iigs-game-engine#readme",
"devDependencies": {
"pngjs": "^6.0.0",
"string-builder": "^0.1.8",
"watch": "latest",
"xml2json": "^0.12.0"
}
}

View File

@ -204,14 +204,15 @@ async function main(argv) {
options.paletteMap = paletteMap;
// Dump the palette in IIgs hex format
console.log('; Palette:');
console.log('; Palette');
const hexCodes = targetPalette.map(c => '$' + paletteToIIgs(c));
// The transparent color is always mapped into color 0, so if a background color is set it goes into index 0
if (options.backgroundColor !== null) {
hexCodes[0] = '$' + paletteToIIgs(hexStringToPalette(options.backgroundColor));
}
console.log(';', hexCodes.join(','));
console.log('TileSetPalette ENT');
console.log(' dw ', hexCodes.join(','));
// Just convert a paletted PNG to IIgs memory format. We make sure that only a few widths
// are supported

View File

@ -373,14 +373,11 @@ function emitBG0Layer(layer, tileset) {
const label = layer.name.split(' ').join('_').split('.').join('_');
const initCode = `
BG0SetUp
lda #${layer.width}
sta TileMapWidth
lda #${layer.height}
sta TileMapHeight
lda #${label}
sta TileMapPtr
lda #^${label}
sta TileMapPtr+2
pea ${layer.width}
pea ${layer.height}
pea ^${label}
pea ${label}
_GTESetBG0TileMapInfo
rts
`;
sb.appendLine(initCode);