From 4c370d96d149a5a38391efe46287d57fe52b2ebb Mon Sep 17 00:00:00 2001 From: neauoire Date: Mon, 5 Apr 2021 11:58:26 -0700 Subject: [PATCH] Started porting examples to new vectors --- build.sh | 2 +- projects/examples/dev.audio.usm | 25 +++++++++++-------------- projects/examples/dev.console.usm | 8 +++----- projects/examples/dev.controller.usm | 20 +++++++++++--------- projects/software/nasu.usm | 1 + 5 files changed, 27 insertions(+), 29 deletions(-) diff --git a/build.sh b/build.sh index a6e2477..6b9323c 100755 --- a/build.sh +++ b/build.sh @@ -28,7 +28,7 @@ else fi echo "Assembling.." -./bin/assembler projects/software/left.usm bin/boot.rom +./bin/assembler projects/examples/dev.controller.usm bin/boot.rom echo "Running.." if [ "${2}" = '--cli' ]; diff --git a/projects/examples/dev.audio.usm b/projects/examples/dev.audio.usm index 8b961df..809dbc2 100644 --- a/projects/examples/dev.audio.usm +++ b/projects/examples/dev.audio.usm @@ -22,25 +22,22 @@ ( devices ) -|0100 ;Console { pad 8 char 1 byte 1 short 2 string 2 } -|0110 ;Screen { width 2 height 2 pad 4 x 2 y 2 color 1 } -|0120 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 } -|0130 ;Controller { p1 1 } -|0140 ;Keys { key 1 } -|0150 ;Mouse { x 2 y 2 state 1 chord 1 } -|0160 ;File { pad 8 name 2 length 2 load 2 save 2 } -|0170 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 } -|01F0 ;System { pad 8 r 2 g 2 b 2 } +|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 } +|0110 ;Console { pad 8 char 1 byte 1 short 2 } +|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 } +|0130 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 } +|0140 ;Controller { buttons 1 } +|0150 ;Keys { key 1 } +|0160 ;Mouse { x 2 y 2 state 1 chord 1 change 1 } +|0170 ;File { pad 8 name 2 length 2 load 2 save 2 } +|0180 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 } ( vectors ) -|0200 ^RESET JMP -|0204 ,ERROR JMP2 -|0208 ,FRAME JMP2 - -@RESET +|0200 @RESET ( theme ) #e0fa =System.r #30fa =System.g #30fa =System.b + ( vectors ) ,FRAME =Screen.vector ~Screen.width #0002 DIV2 DUP2 #0080 SUB2 =trkframe.x1 #0080 ADD2 =trkframe.x2 diff --git a/projects/examples/dev.console.usm b/projects/examples/dev.console.usm index f307a39..5de2927 100644 --- a/projects/examples/dev.console.usm +++ b/projects/examples/dev.console.usm @@ -4,14 +4,12 @@ ( devices ) -|0100 ;Console { pad 8 char 1 byte 1 short 2 } -|0200 ^RESET JMP -|0204 ,ERROR JMP2 -|0208 ,FRAME JMP2 +|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 } +|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 } ( program ) -@RESET +|0200 @RESET ,text1 ,print-label JSR2 ,text2 ,print-label JSR2 diff --git a/projects/examples/dev.controller.usm b/projects/examples/dev.controller.usm index 7712a6c..b5d08a2 100644 --- a/projects/examples/dev.controller.usm +++ b/projects/examples/dev.controller.usm @@ -10,18 +10,20 @@ ( devices ) -|0100 ;Console { pad 8 char 1 byte 1 short 2 } -|0110 ;Screen { width 2 height 2 pad 4 y 2 x 2 color 1 } -|0120 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 } -|0130 ;Controller { p1 1 } -|01F0 ;System { pad 8 r 2 g 2 b 2 } -|0200 ^RESET JMP -|0204 ,ERROR JMP2 -|0208 ,FRAME JMP2 +|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 } +|0110 ;Console { pad 8 char 1 byte 1 short 2 } +|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 } +|0130 ;Sprite { pad 8 x 2 y 2 addr 2 color 1 } +|0140 ;Controller { p1 1 } +|0150 ;Keys { key 1 } +|0160 ;Mouse { x 2 y 2 state 1 chord 1 change 1 } +|0170 ;File { pad 8 name 2 length 2 load 2 save 2 } +|0180 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 } -@RESET +|0200 @RESET ( theme ) #0daf =System.r #02ff =System.g #035f =System.b + ( vectors ) ,FRAME =Screen.vector ( set origin ) ~Screen.width 2/ =Sprite.x diff --git a/projects/software/nasu.usm b/projects/software/nasu.usm index 2aca4cd..8142b73 100644 --- a/projects/software/nasu.usm +++ b/projects/software/nasu.usm @@ -45,6 +45,7 @@ |0200 @RESET ( theme ) #e0fc =System.r #30cc =System.g #30ac =System.b + ( vectors ) ,FRAME =Screen.vector ,FRAME =Screen.vector