update file device and fix padding lengths
This commit is contained in:
parent
abf36856d9
commit
614c886436
2 changed files with 218 additions and 227 deletions
|
@ -29,7 +29,7 @@
|
|||
|60 @Audio3 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|
||||
|a0 @File [ &vector $2 &success $2 &offset-hs $2 &offset-ls $2 &name $2 &length $2 &load $2 &save $2 ]
|
||||
|a0 @File [ &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 ]
|
||||
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||
|
||||
( variables )
|
||||
|
@ -71,7 +71,6 @@
|
|||
|
||||
#0200 .Screen/width DEO2
|
||||
#0110 .Screen/height DEO2
|
||||
|
||||
( initialize state )
|
||||
#00 .ticker STZ
|
||||
#00 .state STZ
|
||||
|
@ -82,7 +81,7 @@
|
|||
|
||||
;carts-file .File/name DEO2
|
||||
#2000 .File/length DEO2
|
||||
;list-buf .File/load DEO2
|
||||
;list-buf .File/read DEO2
|
||||
.File/success DEI2 .list-len STZ2
|
||||
|
||||
CENTER-X .logo-coords/x STZ2
|
||||
|
@ -182,6 +181,10 @@ BRK
|
|||
POP
|
||||
BRK
|
||||
&state6
|
||||
[ ;load-cmd
|
||||
CENTER-X OVR2 ;strlen JSR2 #20 SFT2 SUB2
|
||||
CENTER-Y #0004 SUB
|
||||
#02 ] ;draw-string JSR2
|
||||
POP
|
||||
BRK
|
||||
|
||||
|
@ -832,6 +835,7 @@ RTN
|
|||
@load-cart ( -> )
|
||||
|
||||
.state LDZ INC .state STZ
|
||||
|
||||
;cart ;load-rom JSR2
|
||||
RTN
|
||||
|
||||
|
@ -848,13 +852,6 @@ RTN
|
|||
)
|
||||
|
||||
.File/name DEO2
|
||||
#0000 .File/offset-hs DEO2
|
||||
#0000 .File/offset-ls DEO2
|
||||
|
||||
( return if file can't be found, or zero length )
|
||||
#0001 .File/length DEO2
|
||||
;&tmp .File/load DEO2
|
||||
.File/success DEI2 ORA JMP JMP2r
|
||||
|
||||
( clear wst )
|
||||
#ab
|
||||
|
@ -920,7 +917,7 @@ RTN
|
|||
OVR2 #f401 ( arguments for STZ2 at fd, plus an extra 01 )
|
||||
STHkr ( first argument for ADD2 )
|
||||
.File/success ( argument for DEI2 )
|
||||
#0100 .File/load ( arguments for DEO2 )
|
||||
#0100 .File/read ( arguments for DEO2 )
|
||||
#ff00 .File/length DEO2
|
||||
#00f0 JMP2
|
||||
|
||||
|
@ -956,14 +953,15 @@ RTN
|
|||
( constants )
|
||||
@carts-file "index 00
|
||||
|
||||
@title-loadCart "Select 20 "A 20 "ROM 00
|
||||
@title-confirmCart "Load 20 "This 20 "ROM? 00
|
||||
@title-loadCart "Select 20 "A 20 "Cartridge 00
|
||||
@title-confirmCart "Load 20 "This 20 "Cartridge? 00
|
||||
|
||||
@cart $32
|
||||
@load-cmd "load 20
|
||||
@cart $20
|
||||
@dot-rom ".rom 00
|
||||
|
||||
( sprites )
|
||||
@blank $16
|
||||
@blank $10
|
||||
@uxn-logo [
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 1b 3f 1e 18 18 18
|
||||
00 00 00 00 00 00 00 00 00 e0 f0 38 1c 0c 0c 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|60 @Audio3 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
||||
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|
||||
|a0 @File [ &vector $2 &success $2 &offset-hs $2 &offset-ls $2 &name $2 &length $2 &load $2 &save $2 ]
|
||||
|a0 @File [ &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 ]
|
||||
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||
|
||||
( variables )
|
||||
|
@ -81,7 +81,7 @@
|
|||
|
||||
;carts-file .File/name DEO2
|
||||
#2000 .File/length DEO2
|
||||
;list-buf .File/load DEO2
|
||||
;list-buf .File/read DEO2
|
||||
.File/success DEI2 .list-len STZ2
|
||||
|
||||
CENTER-X .logo-coords/x STZ2
|
||||
|
@ -825,9 +825,9 @@ RTN
|
|||
|
||||
( send it! )
|
||||
#0020 .File/length DEO2
|
||||
#0001 .File/offset-ls DEO2
|
||||
#01 .File/append DEO2
|
||||
;ctl-file .File/name DEO2
|
||||
;load-cmd .File/save DEO2
|
||||
;load-cmd .File/write DEO2
|
||||
|
||||
;slot-file ;load-rom JSR2
|
||||
RTN
|
||||
|
@ -845,13 +845,6 @@ RTN
|
|||
)
|
||||
|
||||
.File/name DEO2
|
||||
#0000 .File/offset-hs DEO2
|
||||
#0000 .File/offset-ls DEO2
|
||||
|
||||
( return if file can't be found, or zero length )
|
||||
#0001 .File/length DEO2
|
||||
;&tmp .File/load DEO2
|
||||
.File/success DEI2 ORA JMP JMP2r
|
||||
|
||||
( clear wst )
|
||||
#ab
|
||||
|
@ -917,7 +910,7 @@ RTN
|
|||
OVR2 #f401 ( arguments for STZ2 at fd, plus an extra 01 )
|
||||
STHkr ( first argument for ADD2 )
|
||||
.File/success ( argument for DEI2 )
|
||||
#0100 .File/load ( arguments for DEO2 )
|
||||
#0100 .File/read ( arguments for DEO2 )
|
||||
#ff00 .File/length DEO2
|
||||
#00f0 JMP2
|
||||
|
||||
|
@ -959,10 +952,10 @@ RTN
|
|||
@title-confirmCart "Load 20 "This 20 "Cartridge? 00
|
||||
|
||||
@load-cmd "load 20
|
||||
@cart $32
|
||||
@cart $20
|
||||
|
||||
( sprites )
|
||||
@blank $16
|
||||
@blank $10
|
||||
@uxn-logo [
|
||||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 1b 3f 1e 18 18 18
|
||||
00 00 00 00 00 00 00 00 00 e0 f0 38 1c 0c 0c 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
|
|
Loading…
Reference in a new issue