Fixed dotw
This commit is contained in:
+12
-2
@@ -19,13 +19,23 @@ fn draw_pixel(value: u8, state: *uxn) void = {
|
|||||||
const auto_a = (auto & 0b00000100) != 0;
|
const auto_a = (auto & 0b00000100) != 0;
|
||||||
set_pixel(layer1,x,y,color,state);
|
set_pixel(layer1,x,y,color,state);
|
||||||
if(auto_x) {
|
if(auto_x) {
|
||||||
const new_x = x + 1;
|
const new_x = if(flipx){
|
||||||
|
yield x - 1;
|
||||||
|
}else{
|
||||||
|
yield x + 1;
|
||||||
|
};
|
||||||
|
// const new_x = x + 1;
|
||||||
state.dev[0x28] = (new_x >> 8): u8;
|
state.dev[0x28] = (new_x >> 8): u8;
|
||||||
state.dev[0x29] = (new_x): u8;
|
state.dev[0x29] = (new_x): u8;
|
||||||
|
|
||||||
};
|
};
|
||||||
if(auto_y) {
|
if(auto_y) {
|
||||||
const new_y = y + 1;
|
const new_y = if(flipy){
|
||||||
|
yield y - 1;
|
||||||
|
}else{
|
||||||
|
yield y + 1;
|
||||||
|
};
|
||||||
|
// const new_y = y + 1;
|
||||||
state.dev[0x2a] = (new_y >> 8): u8;
|
state.dev[0x2a] = (new_y >> 8): u8;
|
||||||
state.dev[0x2b] = (new_y): u8;
|
state.dev[0x2b] = (new_y): u8;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -148,7 +148,7 @@ fn emu_dei(port: u8, state: *uxn) u8 = {
|
|||||||
return time::date::second(&date): u8;
|
return time::date::second(&date): u8;
|
||||||
case 0xc7 =>
|
case 0xc7 =>
|
||||||
const date = time::date::localnow();
|
const date = time::date::localnow();
|
||||||
return time::date::weekday(&date): u8;
|
return (time::date::weekday(&date): u8 + 1) % 7;
|
||||||
case 0xc8 =>
|
case 0xc8 =>
|
||||||
const date = time::date::localnow();
|
const date = time::date::localnow();
|
||||||
const day = time::date::yearday(&date) - 1;
|
const day = time::date::yearday(&date) - 1;
|
||||||
@@ -848,7 +848,7 @@ export fn uxn_step(state: *uxn) (done | error) = {
|
|||||||
|
|
||||||
// /* STH */ OPC(0x0f,GOT(x),PUT(x,!r))
|
// /* STH */ OPC(0x0f,GOT(x),PUT(x,!r))
|
||||||
case let sth_inst: STH =>
|
case let sth_inst: STH =>
|
||||||
let val = pop_or_get(sth_inst,0,state);
|
const val = pop_from_stack(sth_inst.keep,sth_inst.ret,sth_inst.short,state);
|
||||||
push_to_stack(!sth_inst.ret, val, state);
|
push_to_stack(!sth_inst.ret, val, state);
|
||||||
// /* LDZ */ OPC(0x10,POx(a,0),PEK(a, x, 0xff))
|
// /* LDZ */ OPC(0x10,POx(a,0),PEK(a, x, 0xff))
|
||||||
case let ldz_inst: LDZ =>
|
case let ldz_inst: LDZ =>
|
||||||
|
|||||||
Reference in New Issue
Block a user