working on vectrex

This commit is contained in:
Steven Hugg 2020-06-08 20:26:57 -05:00
parent df92d7b73f
commit f1961bc9bf
3 changed files with 939 additions and 1 deletions

View File

@ -501,7 +501,7 @@ export abstract class BaseZ80Platform extends BaseDebugPlatform {
isStable() { return true; }
// TODO: refactor other parts into here
runCPU(cpu, cycles:number) {
runCPU(cpu, cycles:number) : number {
this._cpu = cpu; // TODO?
this.waitCycles = 0; // TODO: needs to spill over betwenn calls
if (this.wasBreakpointHit())
@ -565,6 +565,7 @@ export function cpuStateToLongString_6809(c) {
}
return "PC " + hex(c.PC,4) + " " + decodeFlags(c.CC) + "\n"
+ "SP " + hex(c.SP,4) + "\n"
+ "DP " + hex(c.DP,2) + "\n"
+ " A " + hex(c.A,2) + "\n"
+ " B " + hex(c.B,2) + "\n"
+ " X " + hex(c.X,4) + "\n"

928
src/platform/vectrex.ts Normal file

File diff suppressed because one or more lines are too long

View File

@ -247,6 +247,15 @@ var PLATFORM_PARAMS = {
},
'kim1': {
},
'vectrex': {
code_start: 0x0,
rom_size: 0x8000,
data_start: 0xc880,
data_size: 0x380,
stack_end: 0xcc00,
extra_link_files: ['vectrex.scr', 'libcmoc-crt-vec.a', 'libcmoc-std-vec.a'],
extra_link_args: ['-svectrex.scr', '-lcmoc-crt-vec', '-lcmoc-std-vec'],
},
};
PLATFORM_PARAMS['sms-sms-libcv'] = PLATFORM_PARAMS['sms-sg1000-libcv'];