This commit is contained in:
Lucas Scharenbroich 2021-07-29 05:35:09 -05:00
parent 65af5cbf26
commit 1936a0898c
13 changed files with 216 additions and 22 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
node_modules
emu
src/*_Output.txt
src/GTETestApp

View File

@ -0,0 +1,2 @@
main.ntp=Type(D5),AuxType(0008),Access(E3)
CONRAD.NTP=Type(D5),AuxType(0008),VersionCreate(05),MinVersion(00),Access(E3),FolderInfo1(000000000000000000000000000000000000),FolderInfo2(000000000000000000000000000000000000)

BIN
assets/music/main-nfc.ntp Normal file

Binary file not shown.

BIN
assets/music/main.ntp Normal file

Binary file not shown.

BIN
assets/plant.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
assets/rotopattern.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/woz2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

102
macros/Tool222.Macs.s Normal file
View File

@ -0,0 +1,102 @@
* NinjaTrackerPlus Tool
* Ninjaforce, 2018
* Brutal Deluxe, 2018
* FTA, 1991
_NTPBootInit mac
Tool $01DE
<<<
~NTPStartUp mac
PHW ]1
_NTPStartUp mac
Tool $02DE
<<<
_NTPShutDown mac
Tool $03DE
<<<
~NTPVersion mac
phd ; WordResult
_NTPVersion mac
Tool $04DE
<<<
_NTPReset mac
Tool $05DE
<<<
~NTPStatus mac
phd ; WordResult
_NTPStatus mac
Tool $06DE
<<<
~NTPLoadOneMusic mac
PHL ]1
_NTPLoadOneMusic mac
Tool $09DE
<<<
~NTPPlayMusic mac
PHW ]1
_NTPPlayMusic mac
Tool $0ADE
<<<
_NTPStopMusic mac
Tool $0BDE
<<<
~NTPGetEOfMusic mac
phd ; WordResult
_NTPGetEOfMusic mac
Tool $0CDE
<<<
~NTPAddToBatch mac
PHLW ]1;]2
_NTPAddToBatch mac
Tool $0DDE
<<<
~NTPSelectBatch mac
PHW ]1
_NTPSelectBatch mac
Tool $0EDE
<<<
~NTPKillBatch mac
PHW ]1
_NTPKillBatch mac
Tool $0FDE
<<<
~NTPGetPlayingMusic mac
phd ; WordResult
_NTPGetPlayingMusic mac
Tool $10DE
<<<
~NTPPlayBatch mac
PHL ]1
_NTPPlayBatch mac
Tool $11DE
<<<
~NTPGetTrackVu mac
phd ;Long
phd ; Result
_NTPGetTrackVu mac
Tool $12DE
<<<
_NTPPauseMusic mac
Tool $13DE
<<<
_NTPContinueMusic mac
Tool $14DE
<<<

View File

@ -17,8 +17,10 @@
"build:watch": "watch \"npm run build\" src",
"build:assets-smw": "node ./tools/pngtoiigs.js ./assets/donut-plains-2-8-color.png ./emu/bg1a.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/donut-plains-2-8-color-shift.png ./emu/bg1b.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/donut-plains-1-6-color.png ./emu/fg1.bin",
"build:assets-fatdog": "node ./tools/pngtoiigs.js ./assets/armada-7-color.png ./emu/bg1a.bin --start-index 8 && node ./tools/pngtoiigs.js ./assets/armada-7-color-shift.png ./emu/bg1b.bin --start-index 8 && node ./tools/pngtoiigs.js ./assets/armada-7-color-shuffle.png ./emu/fg1.bin --start-index 1",
"build:assets-plant": "node ./tools/pngtoiigs.js ./assets/plant.png ./emu/bg1a.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/donut-plains-1-6-color.png ./emu/fg1.bin",
"build:assets-woz": "node ./tools/pngtoiigs.js ./assets/woz.png ./emu/bg1a.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/donut-plains-1-6-color.png ./emu/fg1.bin",
"build:assets-woz-fatbits": "node ./tools/pngtoiigs.js ./assets/woz-pixelated.png ./emu/bg1a.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/donut-plains-1-6-color.png ./emu/fg1.bin"
"build:assets-woz-fatbits": "node ./tools/pngtoiigs.js ./assets/woz-pixelated.png ./emu/bg1a.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/donut-plains-1-6-color.png ./emu/fg1.bin",
"build:assets-color-cycle": "node ./tools/pngtoiigs.js ./assets/rotopattern.png ./emu/bg1a.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/woz-shifted.png ./emu/bg1b.bin --start-index 6 && node ./tools/pngtoiigs.js ./assets/donut-plains-1-6-color.png ./emu/fg1.bin"
},
"repository": {
"type": "git",

View File

@ -67,19 +67,19 @@ Demo
; Set a timer to fire every 16 ticks
lda #6
sta Timers
sta Timers+2
lda #UpdateBG1Rotation
sta Timers+4
; lda #6
; sta Timers
; sta Timers+2
; lda #UpdateBG1Rotation
; sta Timers+4
; Every 3 ticks (20 fps) cycle some colors
; lda #3
; sta Timers+8
; sta Timers+10
; lda #DoColorCycle
; sta Timers+12
lda #3
sta Timers+8
sta Timers+10
lda #DoColorCycle
sta Timers+12
:loop
PushLong #0
_GetTick
@ -92,10 +92,12 @@ Demo
sec
sbc lastTick
stx lastTick
jsr _DoTimers
; jsr _DoTimers
; lda #1
; jsr MoveLeft
jsr UpdateBG1Rotation
; jsr DoColorCycle
jsr DoFrame
inc frameCount
@ -133,14 +135,30 @@ Demo
FPSStr str 'FPS'
; Move some colors around
; Move some colors around color (6 - 11) address 12 - 22
DoColorCycle
ldal $E19E00
tax
ldal $E19E02
stal $E19E00
txa
stal $E19E02
ldal $E19E0C
pha
ldal $E19E0E
pha
ldal $E19E10
pha
ldal $E19E12
pha
ldal $E19E14
pha
ldal $E19E16
stal $E19E0C
pla
stal $E19E16
pla
stal $E19E14
pla
stal $E19E12
pla
stal $E19E10
pla
stal $E19E0E
rts
; Triggered timer to sway the background
@ -266,6 +284,17 @@ _DoTimers

View File

@ -18,6 +18,7 @@
use Misc.Macs.s
put ..\macros\App.Macs.s
put ..\macros\EDS.GSOS.MACS.s
put ..\macros\Tool222.MACS.s
put .\blitter\DirectPage.s
mx %00
@ -62,6 +63,24 @@ NO_INTERRUPTS equ 0 ; turn off for crossrunner
_MTStartUp
pea $00DE
pea $0000
_LoadOneTool
_Err
lda UserId
pha
_NTPStartUp
pea #^MusicFile
pea #MusicFile
_NTPLoadOneMusic
pea $0001 ; loop
_NTPPlayMusic
; Use Tool222 (NinjaTrackerPlus) for music playback
; Install interrupt handlers. We use the VBL interrupt to keep animations
; moving at a consistent rate, regarless of the rendered frame rate. The
; one-second timer is generally just used for counters and as a handy
@ -110,6 +129,11 @@ NO_INTERRUPTS equ 0 ; turn off for crossrunner
jsr AllocOneBank2 ; Alloc 64KB for Load/Unpack
sta BankLoad ; Store "Bank Pointer"
ldx #0
jsr SetScreenMode
jsr DoTiles
jsr DoLoadBG1
jsr Demo
EvtLoop
jsr WaitForKey
@ -920,9 +944,16 @@ GrafInit
dw $0000,$0778,$0AAA,$0CFF,$0368,$00AF,$0556
; Woz
DefaultPalette dw $0EEF,$0342,$0C95,$0852,$0DB4,$00C0
;DefaultPalette dw $0EEF,$0342,$0C95,$0852,$0DB4,$00C0
dw $0666,$0999,$0CCC,$0222,$09A0,$0680,$0470,$0051
; Fatdog color cycling
;DefaultPalette dw $0EEF,$0342,$0C95,$0852,$0DB4,$00C0
dw $0156,$0288,$03A8,$07B8,$0034,$0013,$0470,$0051
; Plant
DefaultPalette dw $0EEF,$0342,$0C95,$0852,$0DB4,$00C0
dw $0222,$0333,$0444,$0888,$09A0,$0680,$0470,$0051
; Return the current border color ($0 - $F) in the accumulator
GetBorderColor lda #0000
sep #$20
@ -1120,7 +1151,8 @@ msgLine2 str 'Press a key :'
msgLine3 str ' -> Return to Try Again'
msgLine4 str ' -> Esc to Quit'
; Data storage
; Data storage
MusicFile str '1/main.ntp'
BG1DataFile strl '1/bg1a.bin'
BG1AltDataFile strl '1/bg1b.bin'
@ -1165,3 +1197,18 @@ qtRec adrl $0000
put RotData.s

View File

@ -373,6 +373,10 @@ BuildBank
lda :nextBank
sta [:target],y
ldy #$8000+CODE_EXIT ; Patch one line per bank to enable interrupts
lda #{$004C+{ENABLE_INT}*256}
sta [:target],y
plb
rts
@ -487,7 +491,7 @@ full_return jml blt_return ; Full exit
; Re-enable interrupts and continue -- the even_exit JMP from the previous line will jump here every
; 8 or 16 lines in order to give the system some extra time to handle interrupts.
enable_int ldal stk_save ; restore the stack
enable_int ldal stk_save+1 ; restore the stack
tcs
sep #$20 ; 8-bit mode
ldal STATE_REG ; Read Bank 0 / Write Bank 0
@ -618,3 +622,7 @@ snippets lup 82
]index equ ]index+1
--^
top