mirror of https://git.sr.ht/~rabbits/uxn
Removed refresh port in datetime
This commit is contained in:
parent
2eb18b06a2
commit
72b0458745
2
build.sh
2
build.sh
|
@ -32,7 +32,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Assembling.."
|
echo "Assembling.."
|
||||||
./bin/assembler projects/examples/devices/screen.usm bin/boot.rom
|
./bin/assembler projects/demos/bifurcan.usm bin/boot.rom
|
||||||
|
|
||||||
echo "Running.."
|
echo "Running.."
|
||||||
if [ "${2}" = '--cli' ];
|
if [ "${2}" = '--cli' ];
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
|
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||||
|
|
||||||
( variables )
|
( variables )
|
||||||
|
|
||||||
|
@ -52,8 +52,6 @@ BRK
|
||||||
|
|
||||||
@on-frame ( -> )
|
@on-frame ( -> )
|
||||||
|
|
||||||
#00 .DateTime/refresh DEO
|
|
||||||
|
|
||||||
( only draw once per second )
|
( only draw once per second )
|
||||||
.DateTime/second DEI .last PEK NEQ #01 JNZ [ BRK ]
|
.DateTime/second DEI .last PEK NEQ #01 JNZ [ BRK ]
|
||||||
.DateTime/second DEI .last POK
|
.DateTime/second DEI .last POK
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|40 @Controller [ &vector $2 &button $1 &key $1 ]
|
|40 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||||
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
||||||
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
|
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||||
|
|
||||||
( variables )
|
( variables )
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
|
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||||
|
|
||||||
( variables )
|
( variables )
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ BRK
|
||||||
|
|
||||||
@on-frame
|
@on-frame
|
||||||
|
|
||||||
#00 .DateTime/refresh DEO
|
|
||||||
|
|
||||||
( only draw once per second )
|
( only draw once per second )
|
||||||
.DateTime/second DEI .current PEK NEQ #01 JNZ [ BRK ]
|
.DateTime/second DEI .current PEK NEQ #01 JNZ [ BRK ]
|
||||||
.DateTime/second DEI .current POK
|
.DateTime/second DEI .current POK
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|40 @Controller [ &vector $2 &button $1 &key $1 ]
|
|40 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||||
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
||||||
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
|
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||||
|
|
||||||
( variables )
|
( variables )
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|40 @Controller [ &vector $2 &button $1 &key $1 ]
|
|40 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||||
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|
||||||
|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
|
||||||
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
|
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||||
|
|
||||||
( variables )
|
( variables )
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||||
|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
|
|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
|
|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
||||||
|
|
||||||
( variables )
|
( variables )
|
||||||
|
|
||||||
|
@ -194,7 +194,6 @@
|
||||||
,&loop JMP
|
,&loop JMP
|
||||||
|
|
||||||
@update-fps ( -- )
|
@update-fps ( -- )
|
||||||
#00 .DateTime/refresh DEO
|
|
||||||
.fps/next PEK #01 ADD .fps/next POK
|
.fps/next PEK #01 ADD .fps/next POK
|
||||||
s .fps/second PEK NEQ JMP JMP2r
|
s .fps/second PEK NEQ JMP JMP2r
|
||||||
s .fps/second POK
|
s .fps/second POK
|
||||||
|
|
|
@ -22,7 +22,7 @@ Uint8 peek8(Stack *s, Uint8 a) { if (s->ptr < a + 1) s->error = 1; return s->da
|
||||||
void mempoke8(Uint8 *m, Uint16 a, Uint8 b) { m[a] = b; }
|
void mempoke8(Uint8 *m, Uint16 a, Uint8 b) { m[a] = b; }
|
||||||
Uint8 mempeek8(Uint8 *m, Uint16 a) { return m[a]; }
|
Uint8 mempeek8(Uint8 *m, Uint16 a) { return m[a]; }
|
||||||
void devpoke8(Device *d, Uint8 a, Uint8 b) { d->dat[a & 0xf] = b; d->talk(d, a & 0x0f, 1); }
|
void devpoke8(Device *d, Uint8 a, Uint8 b) { d->dat[a & 0xf] = b; d->talk(d, a & 0x0f, 1); }
|
||||||
Uint8 devpeek8(Device *d, Uint8 a) { return d->dat[a & 0xf]; d->talk(d, a & 0x0f, 0); }
|
Uint8 devpeek8(Device *d, Uint8 a) { d->talk(d, a & 0x0f, 0); return d->dat[a & 0xf]; }
|
||||||
void push16(Stack *s, Uint16 a) { push8(s, a >> 8); push8(s, a); }
|
void push16(Stack *s, Uint16 a) { push8(s, a >> 8); push8(s, a); }
|
||||||
Uint16 pop16(Stack *s) { return pop8(s) + (pop8(s) << 8); }
|
Uint16 pop16(Stack *s) { return pop8(s) + (pop8(s) << 8); }
|
||||||
Uint16 peek16(Stack *s, Uint8 a) { return peek8(s, a * 2) + (peek8(s, a * 2 + 1) << 8); }
|
Uint16 peek16(Stack *s, Uint8 a) { return peek8(s, a * 2) + (peek8(s, a * 2 + 1) << 8); }
|
||||||
|
|
Loading…
Reference in New Issue