Update fatdog demo to use shared GTE Core

This commit is contained in:
Lucas Scharenbroich 2021-08-25 09:35:54 -05:00
parent 99e4505a34
commit 023332dfe6
5 changed files with 2437 additions and 2258 deletions

View File

@ -1,6 +1,6 @@
; IIgs Game Engine
TYP $B3 ; S16 file
TYP $B3 ; S16 file
DSK GTEShooter
XPL
@ -8,4 +8,15 @@
ASM Main.s
; Segment #2 -- Core GTE Code
ASM ..\..\src\Core.s
; Segment #3 -- GTE Rotation Table Data
ASM ..\..\src\RotData.s
DS 0
KND #$1001 ; Type and Attributes ($11=Static+Bank Relative,$01=Data)
ALI BANK
SNA RotData

View File

@ -1,10 +1,175 @@
REL
DSK MAINSEG
DSK MAINSEG
rtl
use EDS.GSOS.MACS.s
use ../../src/GTE.s
use ../../src/Defs.s
mx %00
; Space for player position variables
PlayerX equ AppSpace
PlayerY equ AppSpace+2
phk
plb
jsl EngineStartUp
stz PlayerX
stz PlayerY
ldx #0 ; Use full-screen mode
jsl SetScreenMode
:loop
jsl ReadControl
and #$007F ; Ignore the buttons for now
cmp #'q'
beq :exit
; WASD for player movement
cmp #'w'
bne :not_w
jsr :moveup
brl :loop
:not_w
cmp #'a'
bne :not_a
jsr :moveleft
brl :loop
:not_a
cmp #'s'
bne :not_s
jsr :movedown
brl :loop
:not_s
cmp #'d'
bne :not_d
jsr :moveright
:not_d
brl :loop
:moveup
lda PlayerY
dec
bpl *+5
lda #0
sta PlayerY
jmp DrawPlayer
:movedown
lda PlayerY
inc
cmp #160
bcc *+5
lda #160
sta PlayerY
jmp DrawPlayer
:moveleft
lda PlayerX
dec
bpl *+5
lda #0
sta PlayerX
jmp DrawPlayer
:moveright
lda PlayerX
inc
cmp #140
bcc *+5
lda #140
sta PlayerX
jmp DrawPlayer
; Clean up and do a GS/OS Quit
:exit
jsl EngineShutDown
:quit
_QuitGS qtRec
bcs :fatal
:fatal brk $00
qtRec adrl $0000
da $00
DrawPlayer
lda PlayerY
asl
tax
ldal ScreenAddr,x
clc
adc PlayerX
tay
jsl Spr_001
rts
; Storage for tiles (not used in this demo)
tiledata ENT
; Storage for sprites
StackAddress ds 2
PUT sprites/Ships.s
StackAddress ds 2
PUT sprites/Ships.s

View File

@ -5,7 +5,7 @@ REM
REM Pass the path of the Cadius tool as the first argument (%1)
set CADIUS="%1"
set IMAGE="emu\\Base.2mg"
set IMAGE="..\\..\\emu\\Target.2mg"
set FOLDER="/GTEDEV/Build"
REM Cadius does not overwrite files, so clear the root folder first
@ -13,4 +13,4 @@ REM Cadius does not overwrite files, so clear the root folder first
%CADIUS% CREATEFOLDER %IMAGE% %FOLDER%
REM Now copy files and folders as needed
%CADIUS% ADDFILE %IMAGE% %FOLDER% src\\GTEShooter
%CADIUS% ADDFILE %IMAGE% %FOLDER% .\\GTEShooter

View File

@ -7,7 +7,7 @@
"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": "C:\\Programs\\BrutalDeluxe\\Merlin32\\Library",
"macros": "../../macros",
"crossrunner": "C:\\Programs\\Crossrunner\\Crossrunner.exe",
"mrsprite": "C:\\Programs\\IIgsXDev\\bin\\MrSprite.exe"
},
@ -15,9 +15,10 @@
"build:app": "%npm_package_config_merlin32% -V %npm_package_config_macros% App.s",
"build:sprites": "build-sprites.bat %npm_package_config_mrsprite%",
"build:image": "build-image.bat %npm_package_config_cadius%",
"build:": "npm run build:sprites && npm run build:app && npm run build:image",
"test": "npm build && %npm_package_config_gsport%",
"debug": "%npm_package_config_crossrunner% GTEShooter -Source src\\MAINSEG_Output.txt -Debug -CompatibilityLayer"
"build:all": "npm run build:sprites && npm run build:app && npm run build:image",
"build": "npm run build:app && npm run build:image",
"test": "npm run build && %npm_package_config_gsport%",
"debug": "%npm_package_config_crossrunner% GTEShooter -Source GTEShooter_S02_MAINSEG_Output.txt -Debug -CompatibilityLayer"
},
"repository": {
"type": "git",

File diff suppressed because it is too large Load Diff