mirror of
https://github.com/lscharen/iigs-game-engine.git
synced 2024-06-08 03:29:32 +00:00
Add in some missed updates
This commit is contained in:
parent
a7dad98d50
commit
57ffa8794f
|
@ -9,11 +9,14 @@
|
||||||
use Tool222.Macs.s
|
use Tool222.Macs.s
|
||||||
use Util.Macs.s
|
use Util.Macs.s
|
||||||
use CORE.MACS.s
|
use CORE.MACS.s
|
||||||
use ../../src/GTE.s
|
use GTE.Macs
|
||||||
|
|
||||||
use ../../src/Defs.s
|
use ../../src/Defs.s
|
||||||
|
|
||||||
mx %00
|
mx %00
|
||||||
|
|
||||||
|
TSet EXT
|
||||||
|
|
||||||
; Feature flags
|
; Feature flags
|
||||||
NO_INTERRUPTS equ 0 ; 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
|
||||||
|
@ -22,40 +25,39 @@ NO_MUSIC equ 1 ; turn music + tool loadi
|
||||||
phk
|
phk
|
||||||
plb
|
plb
|
||||||
|
|
||||||
jsl EngineStartUp
|
sta MyUserId ; GS/OS passes the memory manager user ID for the application into the program
|
||||||
|
_MTStartUp ; GTE requires the miscellaneous toolset to be running
|
||||||
|
|
||||||
lda #^MyPalette
|
jsr GTEStartUp ; Load and install the GTE User Tool
|
||||||
ldx #MyPalette
|
|
||||||
ldy #0
|
|
||||||
jsl SetPalette
|
|
||||||
|
|
||||||
ldx #0
|
; Load a tileset
|
||||||
jsl SetScreenMode
|
|
||||||
|
pea #^TSet
|
||||||
|
pea #TSet
|
||||||
|
_GTELoadTileSet
|
||||||
|
|
||||||
|
|
||||||
|
pea $0000
|
||||||
|
pea #^MyPalette
|
||||||
|
pea #MyPalette
|
||||||
|
_GTESetPalette
|
||||||
|
|
||||||
|
pea $0000
|
||||||
|
_GTESetScreenMode
|
||||||
|
|
||||||
; Set up our level data
|
; Set up our level data
|
||||||
jsr BG0SetUp
|
jsr BG0SetUp
|
||||||
jsr BG1SetUp
|
jsr BG1SetUp
|
||||||
jsr TileAnimInit
|
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
|
||||||
|
jsr InitOverlay ; Initialize the status bar
|
||||||
jsr InitOverlay ; Initialize the status bar
|
|
||||||
|
|
||||||
lda #DIRTY_BIT_BG0_REFRESH ; Redraw all of the tiles on the next Render
|
|
||||||
ora #DIRTY_BIT_BG1_REFRESH
|
|
||||||
tsb DirtyBits
|
|
||||||
|
|
||||||
stz frameCount
|
|
||||||
ldal OneSecondCounter
|
|
||||||
sta oldOneSecondCounter
|
|
||||||
|
|
||||||
lda #$FFFF
|
|
||||||
jsl Render
|
|
||||||
EvtLoop
|
EvtLoop
|
||||||
jsl DoTimers
|
jsl DoTimers
|
||||||
jsl Render
|
jsl Render
|
||||||
|
@ -439,6 +441,59 @@ closeRec dw 1 ; pCount
|
||||||
qtRec adrl $0000
|
qtRec adrl $0000
|
||||||
da $00
|
da $00
|
||||||
|
|
||||||
|
|
||||||
|
; Load the GTE User Tool and install it
|
||||||
|
GTEStartUp
|
||||||
|
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 :ok1
|
||||||
|
brk $01
|
||||||
|
|
||||||
|
:ok1
|
||||||
|
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 :ok2
|
||||||
|
brk $02
|
||||||
|
|
||||||
|
:ok2
|
||||||
|
clc ; Give GTE a page of direct page memory
|
||||||
|
tdc
|
||||||
|
adc #$0100
|
||||||
|
pha
|
||||||
|
pea #ENGINE_MODE_DYN_TILES+ENGINE_MODE_TWO_LAYER ; Enable Dynamic Tiles and Two Layer
|
||||||
|
lda MyUserId ; Pass the userId for memory allocation
|
||||||
|
pha
|
||||||
|
_GTEStartUp
|
||||||
|
bcc :ok3
|
||||||
|
brk $03
|
||||||
|
|
||||||
|
:ok3
|
||||||
|
rts
|
||||||
|
|
||||||
PUT App.Msg.s
|
PUT App.Msg.s
|
||||||
PUT Actions.s
|
PUT Actions.s
|
||||||
PUT font.s
|
PUT font.s
|
||||||
|
|
|
@ -7,30 +7,9 @@
|
||||||
; Segment #1 -- Main execution block
|
; Segment #1 -- Main execution block
|
||||||
|
|
||||||
ASM App.Main.s
|
ASM App.Main.s
|
||||||
DS 0 ; Number of bytes of 0's to add at the end of the Segment
|
|
||||||
KND #$1100 ; Type and Attributes ($11=Static+Bank Relative,$00=Code)
|
|
||||||
ALI None ; Boundary Alignment (None)
|
|
||||||
SNA Main
|
SNA Main
|
||||||
|
|
||||||
; Segment #2 -- Core GTE Code
|
; Segment #2 -- Tileset
|
||||||
|
|
||||||
ASM ..\..\src\Core.s
|
|
||||||
SNA Core
|
|
||||||
|
|
||||||
; Segment #3 -- 64KB Tile Memory
|
|
||||||
|
|
||||||
ASM gen\App.TileSet.s
|
ASM gen\App.TileSet.s
|
||||||
DS 0
|
SNA TSET
|
||||||
KND #$1001 ; Type and Attributes ($11=Static+Bank Relative,$01=Data)
|
|
||||||
; ALI BANK
|
|
||||||
SNA Tiles
|
|
||||||
|
|
||||||
; Segment #4 -- Rotation table data
|
|
||||||
|
|
||||||
ASM ..\..\src\RotData.s
|
|
||||||
DS 0
|
|
||||||
KND #$1001 ; Type and Attributes ($11=Static+Bank Relative,$01=Data)
|
|
||||||
ALI BANK
|
|
||||||
SNA RotData
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
; Palette:
|
; Palette:
|
||||||
; $0000,$0777,$0F31,$0E51,$00A0,$02E3,$0BF1,$0FA4,$0FD7,$0EE6,$0F59,$068F,$01CE,$09B9,$0EDA,$0EEE
|
; $0000,$0777,$0F31,$0E51,$00A0,$02E3,$0BF1,$0FA4,$0FD7,$0EE6,$0F59,$068F,$01CE,$09B9,$0EDA,$0EEE
|
||||||
; Converting to BG0 format...
|
; Converting to BG0 format...
|
||||||
tiledata ENT
|
TSet ENT
|
||||||
|
|
||||||
; Reserved space (tile 0 is special...
|
; Reserved space (tile 0 is special...
|
||||||
ds 128
|
ds 128
|
||||||
|
|
|
@ -464,7 +464,7 @@ GTEStartUp
|
||||||
tdc
|
tdc
|
||||||
adc #$0100
|
adc #$0100
|
||||||
pha
|
pha
|
||||||
pea #ENGINE_MODE_DYN_TILES ; Enable Dynamic Tiles
|
pea #ENGINE_MODE_DYN_TILES+ENGINE_MODE_TWO_LAYER ; Enable Dynamic Tiles and Two Layer
|
||||||
lda MyUserId ; Pass the userId for memory allocation
|
lda MyUserId ; Pass the userId for memory allocation
|
||||||
pha
|
pha
|
||||||
_GTEStartUp
|
_GTEStartUp
|
||||||
|
|
Loading…
Reference in New Issue
Block a user