2018-11-28 15:31:07 +00:00
|
|
|
|
2019-08-25 17:01:07 +00:00
|
|
|
import { SG1000, SMS } from "../machine/sms";
|
2019-10-26 01:55:50 +00:00
|
|
|
import { Platform, BaseZ80MachinePlatform, BaseMAMEPlatform, getToolForFilename_z80 } from "../common/baseplatform";
|
|
|
|
import { PLATFORMS } from "../common/emu";
|
2018-11-28 15:31:07 +00:00
|
|
|
|
2018-11-28 22:47:39 +00:00
|
|
|
// TODO: merge w/ coleco
|
|
|
|
export var SG1000_PRESETS = [
|
|
|
|
{id:'text.c', name:'Text Mode'},
|
|
|
|
{id:'hello.c', name:'Scrolling Text'},
|
|
|
|
{id:'text32.c', name:'32-Column Color Text'},
|
2018-11-28 15:31:07 +00:00
|
|
|
{id:'stars.c', name:'Scrolling Starfield'},
|
|
|
|
{id:'cursorsmooth.c', name:'Moving Cursor'},
|
|
|
|
{id:'simplemusic.c', name:'Simple Music'},
|
|
|
|
{id:'musicplayer.c', name:'Multivoice Music'},
|
|
|
|
{id:'mode2bitmap.c', name:'Mode 2 Bitmap'},
|
|
|
|
{id:'mode2compressed.c', name:'Mode 2 Bitmap (LZG)'},
|
|
|
|
{id:'lines.c', name:'Mode 2 Lines'},
|
|
|
|
{id:'multicolor.c', name:'Multicolor Mode'},
|
2018-11-28 22:47:39 +00:00
|
|
|
{id:'siegegame.c', name:'Siege Game'},
|
|
|
|
{id:'shoot.c', name:'Solarian Game'},
|
2019-08-10 01:11:53 +00:00
|
|
|
{id:'climber.c', name:'Climber Game'},
|
2018-11-28 15:31:07 +00:00
|
|
|
];
|
|
|
|
|
2019-08-10 01:11:53 +00:00
|
|
|
export var SMS_PRESETS = [
|
|
|
|
{id:'mode4test.c', name:'Mode 4 Test'},
|
|
|
|
{id:'climber.c', name:'Climber Game'},
|
|
|
|
];
|
2018-11-28 22:47:39 +00:00
|
|
|
|
2018-11-28 15:31:07 +00:00
|
|
|
///
|
|
|
|
|
2019-08-25 17:01:07 +00:00
|
|
|
class SG1000Platform extends BaseZ80MachinePlatform<SG1000> implements Platform {
|
2018-12-01 14:48:30 +00:00
|
|
|
|
2019-08-25 17:01:07 +00:00
|
|
|
newMachine() { return new SG1000(); }
|
|
|
|
getPresets() { return SG1000_PRESETS; }
|
|
|
|
getDefaultExtension() { return ".c"; };
|
|
|
|
readAddress(a) { return this.machine.read(a); }
|
2019-08-25 19:09:21 +00:00
|
|
|
readVRAMAddress(a) { return this.machine.readVRAMAddress(a); }
|
2019-08-25 17:01:07 +00:00
|
|
|
}
|
2018-12-01 14:48:30 +00:00
|
|
|
|
2019-08-25 17:01:07 +00:00
|
|
|
class SMSPlatform extends BaseZ80MachinePlatform<SMS> implements Platform {
|
2018-12-01 14:48:30 +00:00
|
|
|
|
2019-08-25 17:01:07 +00:00
|
|
|
newMachine() { return new SMS(); }
|
|
|
|
getPresets() { return SMS_PRESETS; }
|
|
|
|
getDefaultExtension() { return ".c"; };
|
|
|
|
readAddress(a) { return this.machine.read(a); }
|
2019-08-25 19:09:21 +00:00
|
|
|
readVRAMAddress(a) { return this.machine.readVRAMAddress(a); }
|
2018-11-30 17:37:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
///
|
|
|
|
|
2018-12-01 14:48:30 +00:00
|
|
|
PLATFORMS['sms-sg1000-libcv'] = SG1000Platform;
|
|
|
|
PLATFORMS['sms-sms-libcv'] = SMSPlatform;
|