2018-08-28 18:11:22 -04:00
|
|
|
|
2019-08-26 12:58:42 -04:00
|
|
|
import { BallyAstrocade } from "../machine/astrocade";
|
2019-10-25 20:55:50 -05:00
|
|
|
import { BaseZ80MachinePlatform } from "../common/baseplatform";
|
|
|
|
import { Platform } from "../common/baseplatform";
|
|
|
|
import { PLATFORMS } from "../common/emu";
|
2018-08-28 18:11:22 -04:00
|
|
|
|
2018-12-01 15:00:17 -05:00
|
|
|
// http://metopal.com/projects/ballybook/doku.php
|
|
|
|
|
2018-08-28 18:11:22 -04:00
|
|
|
const ASTROCADE_PRESETS = [
|
2019-12-24 08:29:46 -06:00
|
|
|
{ id: '01-helloworlds.asm', name: 'Hello World (ASM)' },
|
|
|
|
{ id: '02-telephone.asm', name: 'Telephone (ASM)' },
|
|
|
|
{ id: '03-horcbpal.asm', name: 'Paddle Demo (ASM)' },
|
2019-08-25 17:17:03 -04:00
|
|
|
{ id: 'hello.c', name: 'Hello Graphics' },
|
|
|
|
{ id: 'lines.c', name: 'Lines' },
|
|
|
|
{ id: 'sprites.c', name: 'Sprites' },
|
|
|
|
{ id: 'vsync.c', name: 'Sprites w/ VSYNC' },
|
|
|
|
{ id: 'fastsprites.c', name: 'Fast Sprites' },
|
|
|
|
{ id: 'music.c', name: 'Music' },
|
|
|
|
{ id: 'rotate.c', name: 'Rotate Op' },
|
|
|
|
{ id: 'rainbow.c', name: 'Rainbow' },
|
|
|
|
{ id: 'cosmic.c', name: 'Cosmic Impalas Game' },
|
|
|
|
{ id: 'racing.c', name: 'Pseudo 3-D Racing Game' },
|
2018-08-28 18:11:22 -04:00
|
|
|
];
|
|
|
|
|
2018-09-21 08:39:15 -04:00
|
|
|
const ASTROCADE_BIOS_PRESETS = [
|
2019-08-25 17:17:03 -04:00
|
|
|
{ id: 'bios.c', name: 'BIOS' },
|
2018-09-21 08:39:15 -04:00
|
|
|
];
|
|
|
|
|
2019-08-26 12:58:42 -04:00
|
|
|
class BallyAstrocadePlatform extends BaseZ80MachinePlatform<BallyAstrocade> implements Platform {
|
2018-08-28 18:11:22 -04:00
|
|
|
|
2019-08-26 12:58:42 -04:00
|
|
|
newMachine() { return new BallyAstrocade(false); }
|
|
|
|
getPresets() { return ASTROCADE_PRESETS; }
|
|
|
|
getDefaultExtension() { return ".c"; };
|
|
|
|
readAddress(a) { return this.machine.read(a); }
|
2019-08-27 12:12:56 -04:00
|
|
|
getMemoryMap = function() { return { main:[
|
|
|
|
{name:'BIOS',start:0x0,size:0x2000,type:'rom'},
|
|
|
|
//{name:'Cart ROM',start:0x2000,size:0x2000,type:'rom'},
|
|
|
|
//{name:'Magic RAM',start:0x0,size:0x4000,type:'ram'},
|
|
|
|
{name:'Screen RAM',start:0x4000,size:0x1000,type:'ram'},
|
|
|
|
{name:'BIOS Variables',start:0x4fce,size:0x5000-0x4fce,type:'ram'},
|
|
|
|
] } };
|
2020-07-04 09:16:45 -05:00
|
|
|
showHelp(tool:string, ident:string) {
|
|
|
|
window.open("https://8bitworkshop.com/blog/platforms/astrocade/", "_help"); // TODO
|
|
|
|
}
|
2018-09-03 09:37:17 -04:00
|
|
|
}
|
|
|
|
|
2019-08-26 22:42:14 -04:00
|
|
|
class BallyAstrocadeBIOSPlatform extends BallyAstrocadePlatform implements Platform {
|
2018-09-04 22:28:12 -04:00
|
|
|
|
2019-08-26 22:42:14 -04:00
|
|
|
getPresets() { return ASTROCADE_BIOS_PRESETS; }
|
|
|
|
loadROM(title,rom) { this.machine.loadBIOS(rom); }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class BallyArcadePlatform extends BallyAstrocadePlatform implements Platform {
|
|
|
|
|
|
|
|
newMachine() { return new BallyAstrocade(true); }
|
|
|
|
|
2019-08-27 12:12:56 -04:00
|
|
|
getMemoryMap = function() { return { main:[
|
|
|
|
{name:'Magic RAM',start:0x0,size:0x4000,type:'ram'},
|
|
|
|
{name:'Screen RAM',start:0x4000,size:0x4000,type:'ram'},
|
|
|
|
] } };
|
2019-08-26 22:42:14 -04:00
|
|
|
}
|
2018-08-28 18:11:22 -04:00
|
|
|
|
2019-08-26 12:58:42 -04:00
|
|
|
PLATFORMS['astrocade'] = BallyAstrocadePlatform;
|
2019-08-26 22:42:14 -04:00
|
|
|
PLATFORMS['astrocade-bios'] = BallyAstrocadeBIOSPlatform;
|
|
|
|
PLATFORMS['astrocade-arcade'] = BallyArcadePlatform;
|
2019-06-06 15:40:31 -04:00
|
|
|
|