2019-08-06 03:47:23 +00:00
|
|
|
|
2019-08-23 19:05:12 +00:00
|
|
|
import { Atari7800 } from "../machine/atari7800";
|
2023-11-28 03:30:16 +00:00
|
|
|
import { Platform, Base6502MachinePlatform, getToolForFilename_6502 } from "../common/baseplatform";
|
2019-10-26 01:55:50 +00:00
|
|
|
import { PLATFORMS } from "../common/emu";
|
2019-08-11 14:23:56 +00:00
|
|
|
|
2019-08-06 03:47:23 +00:00
|
|
|
var Atari7800_PRESETS = [
|
2023-11-28 03:30:16 +00:00
|
|
|
{id:'sprites.dasm', name:'Sprites (ASM)', category:'Assembler'},
|
|
|
|
|
|
|
|
{id:'wsync.c', name:'WSYNC', category:'CC65'},
|
2019-12-15 16:59:53 +00:00
|
|
|
{id:'sprites.c', name:'Double Buffering'},
|
2019-10-20 16:53:10 +00:00
|
|
|
{id:'scroll.c', name:'Scrolling'},
|
2023-11-28 03:30:16 +00:00
|
|
|
|
|
|
|
{id:'test_conio.c78', name:'Conio Test', category:'cc7800'},
|
|
|
|
{id:'example_small_sprites.c78', name:'Small Sprites'},
|
|
|
|
{id:'example_vertical_scrolling.c78', name:'Vertical Scrolling'},
|
2019-08-06 03:47:23 +00:00
|
|
|
];
|
|
|
|
|
2019-08-23 19:05:12 +00:00
|
|
|
class Atari7800Platform extends Base6502MachinePlatform<Atari7800> implements Platform {
|
2019-08-06 03:47:23 +00:00
|
|
|
|
2019-08-23 19:05:12 +00:00
|
|
|
newMachine() { return new Atari7800(); }
|
|
|
|
getPresets() { return Atari7800_PRESETS; }
|
|
|
|
getDefaultExtension() { return ".c"; };
|
|
|
|
readAddress(a) { return this.machine.readConst(a); }
|
2020-01-27 05:59:09 +00:00
|
|
|
// TODO loadBIOS(bios) { this.machine.loadBIOS(a); }
|
2019-08-27 16:12:56 +00:00
|
|
|
getMemoryMap = function() { return { main:[
|
|
|
|
{name:'TIA',start:0x00,size:0x20,type:'io'},
|
|
|
|
{name:'MARIA',start:0x20,size:0x20,type:'io'},
|
|
|
|
{name:'RAM (6166 Block 0)',start:0x40,size:0xc0,type:'ram'},
|
|
|
|
{name:'RAM (6166 Block 1)',start:0x140,size:0xc0,type:'ram'},
|
|
|
|
{name:'PIA',start:0x280,size:0x18,type:'io'},
|
|
|
|
{name:'RAM',start:0x1800,size:0x1000,type:'ram'}, // TODO: shadow ram
|
2023-11-24 23:50:34 +00:00
|
|
|
{name:'Cartridge ROM',start:0x4000,size:0xc000-6,type:'rom'},
|
|
|
|
{name:'CPU Vectors',start:0xfffa,size:0x6,type:'rom'},
|
2019-08-27 16:12:56 +00:00
|
|
|
] } };
|
2020-07-11 14:51:26 +00:00
|
|
|
getROMExtension() { return ".a78"; }
|
2023-07-06 17:51:41 +00:00
|
|
|
getDebugTree() {
|
|
|
|
let tree = super.getDebugTree();
|
|
|
|
tree['display_list'] = this.machine.getDebugDisplayLists();
|
|
|
|
return tree;
|
|
|
|
}
|
2023-11-28 03:30:16 +00:00
|
|
|
getToolForFilename(filename: string) {
|
|
|
|
if (filename.endsWith(".cc7800")) return "cc7800";
|
|
|
|
if (filename.endsWith(".c78")) return "cc7800";
|
|
|
|
return getToolForFilename_6502(filename);
|
|
|
|
}
|
2019-08-06 03:47:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
PLATFORMS['atari7800'] = Atari7800Platform;
|