1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-08 08:33:32 +00:00
8bitworkshop/src/platform/c64.ts

33 lines
1.3 KiB
TypeScript
Raw Normal View History

2019-08-19 17:42:32 +00:00
2019-09-08 17:36:26 +00:00
import { C64 } from "../machine/c64";
import { Platform, Base6502MachinePlatform } from "../common/baseplatform";
import { PLATFORMS } from "../common/emu";
2019-08-19 17:42:32 +00:00
var C64_PRESETS = [
{id:'hello.dasm', name:'Hello World (ASM)'},
];
2019-09-08 17:36:26 +00:00
class C64Platform extends Base6502MachinePlatform<C64> implements Platform {
2019-08-19 17:42:32 +00:00
2019-09-08 17:36:26 +00:00
newMachine() { return new C64(); }
getPresets() { return C64_PRESETS; }
getDefaultExtension() { return ".c"; };
readAddress(a) { return this.machine.readConst(a); }
loadBios(bios) { this.machine.loadBIOS(bios); }
2019-09-08 17:57:19 +00:00
getMemoryMap() { return { main:[
2019-08-27 16:12:56 +00:00
{name:'6510 Registers',start:0x0, size:0x2,type:'io'},
{name:'RAM', start:0x2, size:0x7ffe,type:'ram'},
{name:'Cartridge ROM',start:0x8000,size:0x2000,type:'rom'},
{name:'BASIC ROM', start:0xa000,size:0x2000,type:'rom'},
{name:'RAM', start:0xc000,size:0x1000,type:'ram'},
{name:'VIC-II I/O', start:0xd000,size:0x0400,type:'io'},
{name:'Color RAM', start:0xd800,size:0x0400,type:'io'},
{name:'CIA 1', start:0xdc00,size:0x0100,type:'io'},
{name:'CIA 2', start:0xdd00,size:0x0100,type:'io'},
{name:'KERNAL ROM', start:0xe000,size:0x2000,type:'rom'},
2019-09-08 17:36:26 +00:00
] } };
2019-08-19 17:42:32 +00:00
}
PLATFORMS['c64'] = C64Platform;