vcs: 24-cycle sleep after HMOVE in examples, nes/c64: fixed climber struct order
This commit is contained in:
parent
58b6f0f922
commit
e8faee01f3
|
@ -150,7 +150,6 @@ TODO:
|
|||
- upload multiple files/zip file to subdirectory
|
||||
- allow "include graphics.asm" instead of "include project/graphics.asm"
|
||||
- convert more stuff to Promises
|
||||
- target ES6
|
||||
- don't have to include firebase always?
|
||||
- squelch error msgs?
|
||||
- test offline? (if window.firebase)
|
||||
|
@ -199,6 +198,12 @@ TODO:
|
|||
- https://github.com/cc65/cc65/issues/946
|
||||
- sample buffer skips
|
||||
|
||||
- upgrade to ES2020?
|
||||
- https://github.com/microsoft/TypeScript/issues/16577
|
||||
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
||||
- need Edge 79+
|
||||
- no import in workers
|
||||
|
||||
|
||||
WEB WORKER FORMAT
|
||||
|
||||
|
|
|
@ -410,15 +410,14 @@ typedef enum ActorState {
|
|||
typedef struct Actor {
|
||||
word yy;
|
||||
byte x;
|
||||
byte name;
|
||||
byte level;
|
||||
sbyte yvel;
|
||||
sbyte xvel;
|
||||
unsigned int color1:4;
|
||||
unsigned int color2:4;
|
||||
byte level;
|
||||
unsigned int state:4;
|
||||
unsigned int dir:1;
|
||||
unsigned int onscreen:1;
|
||||
sbyte yvel;
|
||||
sbyte xvel;
|
||||
} Actor;
|
||||
|
||||
Actor actors[MAX_ACTORS];
|
||||
|
@ -431,7 +430,6 @@ void create_actors_on_floor(byte level_index) {
|
|||
a->state = WALKING;
|
||||
a->color1 = level->ladder1 ^ level->ladder2;
|
||||
a->color2 = level->ladder2;
|
||||
a->name = 0;
|
||||
a->x = level->ladder1 ^ (level->ladder2<<3) ^ (level->gap<<6);
|
||||
a->yy = get_floor_yy(level_index);
|
||||
a->level = level_index;
|
||||
|
@ -713,7 +711,6 @@ void play_scene() {
|
|||
actors[0].state = WALKING;
|
||||
actors[0].color1 = 0x1;
|
||||
actors[0].color2 = 0xb;
|
||||
actors[0].name = 0;
|
||||
actors[0].x = 64;
|
||||
actors[0].yy = get_floor_yy(0);
|
||||
actors[0].level = 0;
|
||||
|
|
|
@ -388,12 +388,12 @@ typedef struct Actor {
|
|||
byte x; // X position in pixels (8 bit)
|
||||
byte floor; // floor index
|
||||
byte state; // ActorState
|
||||
sbyte yvel; // Y velocity (when jumping)
|
||||
sbyte xvel; // X velocity (when jumping)
|
||||
int name:2; // ActorType (2 bits)
|
||||
int pal:2; // palette color (2 bits)
|
||||
int dir:1; // direction (0=right, 1=left)
|
||||
int onscreen:1; // is actor onscreen?
|
||||
sbyte yvel; // Y velocity (when jumping)
|
||||
sbyte xvel; // X velocity (when jumping)
|
||||
} Actor;
|
||||
|
||||
Actor actors[MAX_ACTORS]; // all actors
|
||||
|
|
|
@ -53,7 +53,8 @@ NextFrame
|
|||
sta HMP1 ; 1 pixel to the left
|
||||
sta WSYNC
|
||||
sta HMOVE ; apply HMOVE
|
||||
sta HMCLR
|
||||
SLEEP 24 ; sleep 24 cycles
|
||||
sta HMCLR ; clear HMOVE registers
|
||||
lda #1
|
||||
sta VDELP0 ; we need the VDEL registers
|
||||
sta VDELP1 ; so we can do our 4-store trick
|
||||
|
|
|
@ -58,6 +58,7 @@ NextFrame
|
|||
sta HMP1
|
||||
sta WSYNC
|
||||
sta HMOVE
|
||||
SLEEP 24 ; wait 24 cycles between write to HMOVE and HMxxx
|
||||
sta HMCLR
|
||||
lda #1
|
||||
sta VDELP0
|
||||
|
|
|
@ -49,6 +49,7 @@ NextFrame
|
|||
sta HMP1
|
||||
sta WSYNC
|
||||
sta HMOVE
|
||||
SLEEP 24
|
||||
sta HMCLR
|
||||
lda #1
|
||||
sta VDELP0
|
||||
|
|
|
@ -389,6 +389,12 @@ export class SourceEditor implements ProjectView {
|
|||
toggleBreakpoint(lineno: number) {
|
||||
if (this.sourcefile != null) {
|
||||
var targetPC = this.sourcefile.line2offset[lineno+1];
|
||||
/* TODO: breakpoints
|
||||
var bpid = "pc" + targetPC;
|
||||
platform.setBreakpoint(bpid, () => {
|
||||
return platform.getPC() == targetPC;
|
||||
});
|
||||
*/
|
||||
runToPC(targetPC);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ export var ColecoVision_PRESETS = [
|
|||
{ id: 'multicolor.c', name: 'Multicolor Mode' },
|
||||
{ id: 'siegegame.c', name: 'Siege Game' },
|
||||
{ id: 'shoot.c', name: 'Solarian Game' },
|
||||
{ id: 'climber.c', name: 'Platform Game' },
|
||||
{ id: 'climber.c', name: 'Climber Game' },
|
||||
];
|
||||
|
||||
class ColecoVisionPlatform extends BaseZ80MachinePlatform<ColecoVision> implements Platform {
|
||||
|
|
|
@ -33,7 +33,7 @@ var LIBCV_PRESETS = [
|
|||
{ id: 'multicolor.c', name: 'Multicolor Mode' },
|
||||
{ id: 'siegegame.c', name: 'Siege Game' },
|
||||
{ id: 'shoot.c', name: 'Solarian Game' },
|
||||
{ id: 'climber.c', name: 'Platform Game' },
|
||||
{ id: 'climber.c', name: 'Climber Game' },
|
||||
];
|
||||
|
||||
class MSXPlatform extends BaseZ80MachinePlatform<MSX1> implements Platform {
|
||||
|
|
Loading…
Reference in New Issue