The supervisor program now uses its own vectors
This commit is contained in:
parent
1a7af4d8d0
commit
41d0911d13
|
@ -36,14 +36,13 @@
|
||||||
|
|
||||||
@center
|
@center
|
||||||
&x $2 &y $2
|
&x $2 &y $2
|
||||||
|
|
||||||
@modal
|
@modal
|
||||||
&x $2 &y $2
|
&x $2 &y $2
|
||||||
|
|
||||||
( init )
|
( init )
|
||||||
|
|
||||||
|0100 ( -> )
|
|0100 ( -> )
|
||||||
|
|
||||||
.Screen/width DEI2 2//
|
.Screen/width DEI2 2//
|
||||||
DUP2 .center/x STZ2
|
DUP2 .center/x STZ2
|
||||||
MODALW #31 SFT2 -- .modal/x STZ2
|
MODALW #31 SFT2 -- .modal/x STZ2
|
||||||
|
@ -51,11 +50,17 @@
|
||||||
DUP2 .center/y STZ2
|
DUP2 .center/y STZ2
|
||||||
MODALH #31 SFT2 -- .modal/y STZ2
|
MODALH #31 SFT2 -- .modal/y STZ2
|
||||||
|
|
||||||
|
( vectors )
|
||||||
|
;on-error .System/vector DEO2
|
||||||
|
;on-frame .Screen/vector DEO2
|
||||||
|
|
||||||
|
BRK
|
||||||
|
|
||||||
|
@on-frame ( -> )
|
||||||
|
|
||||||
;draw-cross JSR2
|
;draw-cross JSR2
|
||||||
;draw-stacks JSR2
|
;draw-stacks JSR2
|
||||||
|
|
||||||
EADDR LDA2 #0000 !! ;on-error JCN2
|
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@on-error ( -> )
|
@on-error ( -> )
|
||||||
|
|
|
@ -31,7 +31,7 @@ uxn_halt(Uxn *u, Uint8 error, Uint16 addr)
|
||||||
Uint16 vec = d->vector;
|
Uint16 vec = d->vector;
|
||||||
DEVPOKE16(0x4, addr);
|
DEVPOKE16(0x4, addr);
|
||||||
d->dat[0x6] = error;
|
d->dat[0x6] = error;
|
||||||
uxn_eval(&supervisor, PAGE_PROGRAM);
|
uxn_eval(&supervisor, supervisor.dev[0].vector);
|
||||||
if(vec) {
|
if(vec) {
|
||||||
d->vector = 0; /* need to rearm to run System/vector again */
|
d->vector = 0; /* need to rearm to run System/vector again */
|
||||||
if(error != 2) /* working stack overflow has special treatment */
|
if(error != 2) /* working stack overflow has special treatment */
|
||||||
|
|
|
@ -309,6 +309,8 @@ start(Uxn *u, char *rom)
|
||||||
uxn_port(&supervisor, 0x1, nil_dei, console_deo);
|
uxn_port(&supervisor, 0x1, nil_dei, console_deo);
|
||||||
uxn_port(&supervisor, 0x2, screen_dei, screen_deo);
|
uxn_port(&supervisor, 0x2, screen_dei, screen_deo);
|
||||||
|
|
||||||
|
uxn_eval(&supervisor, PAGE_PROGRAM);
|
||||||
|
|
||||||
if(!uxn_eval(u, PAGE_PROGRAM))
|
if(!uxn_eval(u, PAGE_PROGRAM))
|
||||||
return error("Boot", "Failed to start rom.");
|
return error("Boot", "Failed to start rom.");
|
||||||
|
|
||||||
|
@ -485,7 +487,7 @@ run(Uxn *u)
|
||||||
console_input(u, event.cbutton.button);
|
console_input(u, event.cbutton.button);
|
||||||
}
|
}
|
||||||
if(devsystem->dat[0xe])
|
if(devsystem->dat[0xe])
|
||||||
uxn_eval(&supervisor, PAGE_PROGRAM);
|
uxn_eval(&supervisor, supervisor.dev[2].vector);
|
||||||
uxn_eval(u, devscreen->vector);
|
uxn_eval(u, devscreen->vector);
|
||||||
if(uxn_screen.fg.changed || uxn_screen.bg.changed || devsystem->dat[0xe])
|
if(uxn_screen.fg.changed || uxn_screen.bg.changed || devsystem->dat[0xe])
|
||||||
redraw();
|
redraw();
|
||||||
|
|
Loading…
Reference in New Issue