mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-21 21:29:11 +00:00
moved segments into Platform object
This commit is contained in:
parent
4301764154
commit
ca7d488f1c
@ -178,8 +178,6 @@ TODO:
|
||||
- "shared" in URL doesn't work, leave in URL? (also importURL)
|
||||
- alert when skeleton file loaded or file not found
|
||||
|
||||
- move segments into Platform object
|
||||
|
||||
- TypeError: null is not an object (evaluating 'n.destination')
|
||||
https://8bitworkshop.com/v3.4.1/javatari.js/release/javatari/javatari.js
|
||||
(32:443651) Safari 12.1.2
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { RAM, RasterVideo, dumpRAM, AnimationTimer, setKeyboardFromMap, padBytes, ControllerPoller } from "./emu";
|
||||
import { hex, printFlags, invertMap } from "./util";
|
||||
import { CodeAnalyzer } from "./analysis";
|
||||
import { Segment } from "./workertypes";
|
||||
import { disassemble6502 } from "./cpu/disasm6502";
|
||||
import { disassembleZ80 } from "./cpu/disasmz80";
|
||||
import { Z80 } from "./cpu/ZilogZ80";
|
||||
@ -54,9 +55,8 @@ export class DebugSymbols {
|
||||
}
|
||||
}
|
||||
|
||||
export interface PlatformMetadata {
|
||||
name : string; // TODO
|
||||
}
|
||||
type MemoryMapType = "main" | "vram";
|
||||
type MemoryMap = { [type:string] : Segment[] };
|
||||
|
||||
export function isDebuggable(arg:any): arg is Debuggable {
|
||||
return typeof arg.getDebugCategories === 'function';
|
||||
@ -78,7 +78,6 @@ export interface Platform {
|
||||
resume() : void;
|
||||
loadROM(title:string, rom:any); // TODO: Uint8Array
|
||||
loadBIOS?(title:string, rom:Uint8Array);
|
||||
getMetadata?() : PlatformMetadata;
|
||||
|
||||
loadState?(state : EmuState) : void;
|
||||
saveState?() : EmuState;
|
||||
@ -108,6 +107,9 @@ export interface Platform {
|
||||
getPC?() : number;
|
||||
getOriginPC?() : number;
|
||||
newCodeAnalyzer?() : CodeAnalyzer;
|
||||
|
||||
getPlatformName?() : string;
|
||||
getMemoryMap?() : MemoryMap;
|
||||
|
||||
setRecorder?(recorder : EmuRecorder) : void;
|
||||
advance?(novideo? : boolean) : void;
|
||||
|
@ -1,4 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { Platform, Base6502Platform, BaseMAMEPlatform, getOpcodeMetadata_6502, getToolForFilename_6502 } from "../baseplatform";
|
||||
import { PLATFORMS, RAM, newAddressDecoder, padBytes, noise, setKeyboardFromMap, AnimationTimer, RasterVideo, Keys, KeyFlags, makeKeycodeMap, dumpRAM } from "../emu";
|
||||
@ -63,6 +62,10 @@ class NewApple2Platform extends Base6502MachinePlatform<AppleII> implements Plat
|
||||
getDefaultExtension() { return ".c"; };
|
||||
readAddress(a) { return this.machine.readConst(a); }
|
||||
// TODO loadBios(bios) { this.machine.loadBIOS(a); }
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'I/O',start:0xc000,size:0x1000,type:'io'},
|
||||
{name:'ROM',start:0xd000,size:0x3000-6,type:'rom'},
|
||||
] } };
|
||||
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,13 @@ class BallyAstrocadePlatform extends BaseZ80MachinePlatform<BallyAstrocade> impl
|
||||
getDefaultExtension() { return ".c"; };
|
||||
readAddress(a) { return this.machine.read(a); }
|
||||
loadBios(title,bios) { this.machine.loadBIOS(bios); }
|
||||
|
||||
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'},
|
||||
] } };
|
||||
}
|
||||
|
||||
class BallyAstrocadeBIOSPlatform extends BallyAstrocadePlatform implements Platform {
|
||||
@ -47,6 +53,10 @@ class BallyArcadePlatform extends BallyAstrocadePlatform implements Platform {
|
||||
|
||||
newMachine() { return new BallyAstrocade(true); }
|
||||
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'Magic RAM',start:0x0,size:0x4000,type:'ram'},
|
||||
{name:'Screen RAM',start:0x4000,size:0x4000,type:'ram'},
|
||||
] } };
|
||||
}
|
||||
|
||||
PLATFORMS['astrocade'] = BallyAstrocadePlatform;
|
||||
|
@ -1,4 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { MOS6502 } from "../cpu/MOS6502";
|
||||
import { Atari7800 } from "../machine/atari7800";
|
||||
@ -16,7 +15,15 @@ class Atari7800Platform extends Base6502MachinePlatform<Atari7800> implements Pl
|
||||
getDefaultExtension() { return ".c"; };
|
||||
readAddress(a) { return this.machine.readConst(a); }
|
||||
// TODO loadBios(bios) { this.machine.loadBIOS(a); }
|
||||
|
||||
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
|
||||
{name:'Cartridge ROM',start:0x4000,size:0xc000,type:'rom'},
|
||||
] } };
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -521,6 +521,21 @@ class C64Platform extends Base6502Platform implements Platform {
|
||||
default: return super.getDebugInfo(category, state);
|
||||
}
|
||||
}
|
||||
|
||||
getMemoryMap() {
|
||||
return { main: [
|
||||
{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'},
|
||||
]};
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -28,7 +28,10 @@ class ColecoVisionPlatform extends BaseZ80MachinePlatform<ColecoVision> implemen
|
||||
readAddress(a) { return this.machine.read(a); }
|
||||
readVRAMAddress(a) { return this.machine.readVRAMAddress(a); }
|
||||
// TODO loadBios(bios) { this.machine.loadBIOS(a); }
|
||||
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'BIOS',start:0x0,size:0x2000,type:'rom'},
|
||||
{name:'Cartridge Header',start:0x8000,size:0x100,type:'rom'},
|
||||
] } };
|
||||
}
|
||||
|
||||
/// MAME support
|
||||
|
@ -414,6 +414,11 @@ const _GalaxianPlatform = function(mainElement, options) {
|
||||
cpu.reset();
|
||||
watchdog_counter = INITIAL_WATCHDOG;
|
||||
}
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'Video RAM',start:0x5000,size:0x400,type:'ram'},
|
||||
{name:'Sprite RAM',start:0x5800,size:0x100,type:'ram'},
|
||||
{name:'I/O Registers',start:0x6000,size:0x2000,type:'io'},
|
||||
] } };
|
||||
}
|
||||
|
||||
return new GalaxianPlatform();
|
||||
|
@ -1,4 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { Platform, Base6502Platform, BaseMAMEPlatform, getOpcodeMetadata_6502, getToolForFilename_6502 } from "../baseplatform";
|
||||
import { PLATFORMS, RAM, newAddressDecoder, padBytes, noise, setKeyboardFromMap, AnimationTimer, RasterVideo, Keys, makeKeycodeMap, dumpRAM, getMousePos, EmuHalt, KeyFlags, _setKeyboardEvents } from "../emu";
|
||||
@ -235,6 +234,13 @@ class KIM1Platform extends Base6502Platform implements Platform {
|
||||
getCPUState() {
|
||||
return this.fixPC(this.cpu.saveState());
|
||||
}
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'RAM', start:0x0000,size:0x1400,type:'ram'},
|
||||
{name:'6530', start:0x1700,size:0x0040,type:'io'},
|
||||
{name:'6530', start:0x1740,size:0x0040,type:'io'},
|
||||
{name:'RAM', start:0x1780,size:0x0080,type:'ram'},
|
||||
{name:'BIOS', start:0x1800,size:0x0800,type:'rom'},
|
||||
] } };
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -44,7 +44,13 @@ class MSXPlatform extends BaseZ80MachinePlatform<MSX1> implements Platform {
|
||||
readAddress(a) { return this.machine.read(a); }
|
||||
readVRAMAddress(a) { return this.machine.readVRAMAddress(a); }
|
||||
// TODO loadBios(bios) { this.machine.loadBIOS(a); }
|
||||
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'BIOS',start:0x0,size:0x4000,type:'rom'},
|
||||
//{name:'Cartridge',start:0x4000,size:0x4000,type:'rom'},
|
||||
{name:'RAM',start:0xc000,size:0x3200,type:'ram'},
|
||||
{name:'Stack',start:0xf000,size:0x300,type:'ram'},
|
||||
{name:'BIOS Work RAM',start:0xf300,size:0xd00},
|
||||
] } };
|
||||
}
|
||||
|
||||
class MSXLibCVPlatform extends MSXPlatform implements Platform {
|
||||
|
@ -19,6 +19,9 @@ class Midway8080BWPlatform extends BaseZ80MachinePlatform<Midway8080> implements
|
||||
getPresets() { return MW8080BW_PRESETS; }
|
||||
getDefaultExtension() { return ".c"; };
|
||||
readAddress(a) { return this.machine.read(a); }
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'Frame Buffer',start:0x2400,size:7168,type:'ram'},
|
||||
] } };
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import { Platform, Base6502Platform, BaseMAMEPlatform, getOpcodeMetadata_6502, cpuStateToLongString_6502, getToolForFilename_6502, dumpStackToString, ProfilerOutput } from "../baseplatform";
|
||||
import { PLATFORMS, RAM, newAddressDecoder, padBytes, noise, setKeyboardFromMap, AnimationTimer, RasterVideo, Keys, makeKeycodeMap, dumpRAM, KeyFlags, EmuHalt, ControllerPoller } from "../emu";
|
||||
@ -454,6 +453,14 @@ class JSNESPlatform extends Base6502Platform implements Platform, Probeable {
|
||||
connectProbe(probe:ProbeAll) {
|
||||
this.probe = probe || this.nullProbe;
|
||||
}
|
||||
|
||||
getMemoryMap = function() { return { main:[
|
||||
//{name:'Work RAM',start:0x0,size:0x800,type:'ram'},
|
||||
{name:'OAM Buffer',start:0x200,size:0x100,type:'ram'},
|
||||
{name:'PPU Registers',start:0x2000,last:0x2008,size:0x2000,type:'io'},
|
||||
{name:'APU Registers',start:0x4000,last:0x4020,size:0x2000,type:'io'},
|
||||
{name:'Cartridge RAM',start:0x6000,size:0x2000,type:'ram'},
|
||||
] } };
|
||||
}
|
||||
|
||||
/// MAME support
|
||||
|
@ -306,6 +306,12 @@ class VCSPlatform extends BasePlatform {
|
||||
window.open("https://alienbill.com/2600/101/docs/stella.html", "_help"); // TODO
|
||||
}
|
||||
|
||||
getMemoryMap = function() { return {main:[
|
||||
{name:'TIA Registers',start:0x00,size:0x80,type:'io'},
|
||||
{name:'PIA RAM',start:0x80,size:0x80,type:'ram'},
|
||||
{name:'PIA Ports and Timer',start:0x280,size:0x18,type:'io'},
|
||||
{name:'Cartridge ROM',start:0xf000,size:0x1000,type:'rom'},
|
||||
]}};
|
||||
};
|
||||
|
||||
// TODO: mixin for Base6502Platform?
|
||||
@ -346,6 +352,7 @@ class VCSMAMEPlatform extends BaseMAMEPlatform implements Platform {
|
||||
getOriginPC = function() {
|
||||
return (this.readAddress(0xfffc) | (this.readAddress(0xfffd) << 8)) & 0xffff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////////////////
|
||||
|
@ -172,6 +172,11 @@ var AtariVectorPlatform = function(mainElement) {
|
||||
this.getCPUState = function() {
|
||||
return cpu.saveState();
|
||||
}
|
||||
this.getMemoryMap = function() { return { main:[
|
||||
{name:'Switches/POKEY I/O',start:0x7800,size:0x1000,type:'io'},
|
||||
{name:'DVG I/O',start:0x8800,size:0x100,type:'io'},
|
||||
{name:'EAROM',start:0x8900,size:0x100,type:'ram'},
|
||||
] } };
|
||||
}
|
||||
|
||||
var AtariColorVectorPlatform = function(mainElement) {
|
||||
@ -458,6 +463,12 @@ var Z80ColorVectorPlatform = function(mainElement, proto) {
|
||||
this.getCPUState = function() {
|
||||
return cpu.saveState();
|
||||
}
|
||||
this.getMemoryMap = function() { return { main:[
|
||||
{name:'Switches/POKEY I/O',start:0x8000,size:0x100,type:'io'},
|
||||
{name:'Math Box I/O',start:0x8100,size:0x100,type:'io'},
|
||||
{name:'DVG I/O',start:0x8800,size:0x100,type:'io'},
|
||||
{name:'DVG RAM',start:0xa000,size:0x4000,type:'ram'},
|
||||
] } };
|
||||
}
|
||||
|
||||
// DIGITAL VIDEO GENERATOR
|
||||
|
@ -21,7 +21,10 @@ class VicDualPlatform extends BaseZ80MachinePlatform<VicDual> implements Platfor
|
||||
getDefaultExtension() { return ".c"; };
|
||||
readAddress(a) { return this.machine.read(a); }
|
||||
// TODO loadBios(bios) { this.machine.loadBIOS(a); }
|
||||
|
||||
getMemoryMap = function() { return { main:[
|
||||
{name:'Cell RAM',start:0xe000,size:32*32,type:'ram'},
|
||||
{name:'Tile RAM',start:0xe800,size:256*8,type:'ram'},
|
||||
] } };
|
||||
}
|
||||
|
||||
PLATFORMS['vicdual'] = VicDualPlatform;
|
||||
|
@ -416,6 +416,10 @@ var WilliamsPlatform = function(mainElement, proto) {
|
||||
cpuFrequency *= scale;
|
||||
cpuCyclesPerFrame *= scale;
|
||||
}
|
||||
this.getMemoryMap = function() { return { main:[
|
||||
{name:'Video RAM',start:0x0000,size:0xc000,type:'ram'},
|
||||
{name:'I/O Registers',start:0xc000,size:0x1000,type:'io'},
|
||||
] } };
|
||||
}
|
||||
|
||||
var WilliamsZ80Platform = function(mainElement) {
|
||||
|
@ -299,10 +299,10 @@ export class CodeProject {
|
||||
}
|
||||
}
|
||||
// save and sort segment list
|
||||
this.segments = data.segments;
|
||||
if (this.segments) {
|
||||
this.segments.sort((a,b) => {return a.start-b.start});
|
||||
}
|
||||
var segs = (this.platform.getMemoryMap && this.platform.getMemoryMap()["main"]) || [];
|
||||
segs = segs.concat(data.segments || []);
|
||||
segs.sort((a,b) => {return a.start-b.start});
|
||||
this.segments = segs;
|
||||
}
|
||||
|
||||
getListings() : CodeListingMap {
|
||||
|
@ -239,7 +239,7 @@ function refreshWindowList() {
|
||||
return new Views.MemoryView();
|
||||
});
|
||||
}
|
||||
if (current_project.segments) {
|
||||
if (current_project.segments && current_project.segments.length) {
|
||||
addWindowItem("#memmap", "Memory Map", () => {
|
||||
return new Views.MemoryMapView();
|
||||
});
|
||||
@ -1894,7 +1894,7 @@ function loadImportedURL(url : string) {
|
||||
}
|
||||
|
||||
function setPlatformUI() {
|
||||
var name = platform.getMetadata && platform.getMetadata().name;
|
||||
var name = platform.getPlatformName && platform.getPlatformName();
|
||||
var menuitem = $('a[href="?platform='+platform_id+'"]');
|
||||
if (menuitem.length) {
|
||||
menuitem.addClass("dropdown-item-checked");
|
||||
|
@ -57,12 +57,6 @@ var PLATFORM_PARAMS = {
|
||||
code_size: 0xf000,
|
||||
data_start: 0x80,
|
||||
data_size: 0x80,
|
||||
extra_segments:[
|
||||
{name:'TIA Registers',start:0x00,size:0x80,type:'io'},
|
||||
{name:'PIA RAM',start:0x80,size:0x80,type:'ram'},
|
||||
{name:'PIA Ports and Timer',start:0x280,size:0x18,type:'io'},
|
||||
{name:'Cartridge ROM',start:0xf000,size:0x1000,type:'rom'},
|
||||
],
|
||||
},
|
||||
'mw8080bw': {
|
||||
code_start: 0x0,
|
||||
@ -70,9 +64,6 @@ var PLATFORM_PARAMS = {
|
||||
data_start: 0x2000,
|
||||
data_size: 0x400,
|
||||
stack_end: 0x2400,
|
||||
extra_segments:[
|
||||
{name:'Frame Buffer',start:0x2400,size:7168,type:'ram'},
|
||||
],
|
||||
},
|
||||
'vicdual': {
|
||||
code_start: 0x0,
|
||||
@ -80,10 +71,6 @@ var PLATFORM_PARAMS = {
|
||||
data_start: 0xe400,
|
||||
data_size: 0x400,
|
||||
stack_end: 0xe800,
|
||||
extra_segments:[
|
||||
{name:'Cell RAM',start:0xe000,size:32*32,type:'ram'},
|
||||
{name:'Tile RAM',start:0xe800,size:256*8,type:'ram'},
|
||||
],
|
||||
},
|
||||
'galaxian': {
|
||||
code_start: 0x0,
|
||||
@ -98,11 +85,6 @@ var PLATFORM_PARAMS = {
|
||||
data_start: 0x4000,
|
||||
data_size: 0x400,
|
||||
stack_end: 0x4800,
|
||||
extra_segments:[
|
||||
{name:'Video RAM',start:0x5000,size:0x400,type:'ram'},
|
||||
{name:'Sprite RAM',start:0x5800,size:0x100,type:'ram'},
|
||||
{name:'I/O Registers',start:0x6000,size:0x2000,type:'io'},
|
||||
],
|
||||
},
|
||||
'williams': {
|
||||
code_start: 0x0,
|
||||
@ -110,10 +92,6 @@ var PLATFORM_PARAMS = {
|
||||
data_start: 0x9800,
|
||||
data_size: 0x2800,
|
||||
stack_end: 0xc000,
|
||||
extra_segments:[
|
||||
{name:'Video RAM',start:0x0000,size:0xc000,type:'ram'},
|
||||
{name:'I/O Registers',start:0xc000,size:0x1000,type:'io'},
|
||||
],
|
||||
},
|
||||
'williams-z80': {
|
||||
code_start: 0x0,
|
||||
@ -121,10 +99,6 @@ var PLATFORM_PARAMS = {
|
||||
data_start: 0x9800,
|
||||
data_size: 0x2800,
|
||||
stack_end: 0xc000,
|
||||
extra_segments:[
|
||||
{name:'Video RAM',start:0x0000,size:0xc000,type:'ram'},
|
||||
{name:'I/O Registers',start:0xc000,size:0x1000,type:'io'},
|
||||
],
|
||||
},
|
||||
'vector-z80color': {
|
||||
code_start: 0x0,
|
||||
@ -132,23 +106,12 @@ var PLATFORM_PARAMS = {
|
||||
data_start: 0xe000,
|
||||
data_size: 0x2000,
|
||||
stack_end: 0x0,
|
||||
extra_segments:[
|
||||
{name:'Switches/POKEY I/O',start:0x8000,size:0x100,type:'io'},
|
||||
{name:'Math Box I/O',start:0x8100,size:0x100,type:'io'},
|
||||
{name:'DVG I/O',start:0x8800,size:0x100,type:'io'},
|
||||
{name:'DVG RAM',start:0xa000,size:0x4000,type:'ram'},
|
||||
],
|
||||
},
|
||||
'vector-ataricolor': { //TODO
|
||||
define: '__VECTOR__',
|
||||
cfgfile: 'vector-color.cfg',
|
||||
libargs: ['crt0.o', 'sim6502.lib'],
|
||||
extra_link_files: ['crt0.o', 'vector-color.cfg'],
|
||||
extra_segments:[
|
||||
{name:'Switches/POKEY I/O',start:0x7800,size:0x1000,type:'io'},
|
||||
{name:'DVG I/O',start:0x8800,size:0x100,type:'io'},
|
||||
{name:'EAROM',start:0x8900,size:0x100,type:'ram'},
|
||||
],
|
||||
},
|
||||
'sound_williams-z80': {
|
||||
code_start: 0x0,
|
||||
@ -173,10 +136,6 @@ var PLATFORM_PARAMS = {
|
||||
stack_end: 0x8000,
|
||||
extra_preproc_args: ['-I', '/share/include/coleco', '-D', 'CV_CV'],
|
||||
extra_link_args: ['-k', '/share/lib/coleco', '-l', 'libcv', '-l', 'libcvu', 'crt0.rel'],
|
||||
extra_segments:[
|
||||
{name:'BIOS',start:0x0,size:0x2000,type:'rom'},
|
||||
{name:'Cartridge Header',start:0x8000,size:0x100,type:'rom'},
|
||||
],
|
||||
},
|
||||
'msx': {
|
||||
rom_start: 0x4000,
|
||||
@ -187,13 +146,6 @@ var PLATFORM_PARAMS = {
|
||||
stack_end: 0xffff,
|
||||
extra_link_args: ['crt0-msx.rel'],
|
||||
extra_link_files: ['crt0-msx.rel', 'crt0-msx.lst'],
|
||||
extra_segments:[
|
||||
{name:'BIOS',start:0x0,size:0x4000,type:'rom'},
|
||||
//{name:'Cartridge',start:0x4000,size:0x4000,type:'rom'},
|
||||
{name:'RAM',start:0xc000,size:0x3200,type:'ram'},
|
||||
{name:'Stack',start:0xf000,size:0x300,type:'ram'},
|
||||
{name:'BIOS Work RAM',start:0xf300,size:0xd00},
|
||||
],
|
||||
},
|
||||
'msx-libcv': {
|
||||
rom_start: 0x4000,
|
||||
@ -206,13 +158,6 @@ var PLATFORM_PARAMS = {
|
||||
extra_link_args: ['-k', '.', '-l', 'libcv-msx', '-l', 'libcvu-msx', 'crt0-msx.rel'],
|
||||
extra_link_files: ['libcv-msx.lib', 'libcvu-msx.lib', 'crt0-msx.rel', 'crt0-msx.lst'],
|
||||
extra_compile_files: ['cv.h','cv_graphics.h','cv_input.h','cv_sound.h','cv_support.h','cvu.h','cvu_c.h','cvu_compression.h','cvu_f.h','cvu_graphics.h','cvu_input.h','cvu_sound.h'],
|
||||
extra_segments:[
|
||||
{name:'BIOS',start:0x0,size:0x4000,type:'rom'},
|
||||
//{name:'Cartridge',start:0x4000,size:0x4000,type:'rom'},
|
||||
{name:'RAM',start:0xc000,size:0x3200,type:'ram'},
|
||||
{name:'Stack',start:0xf000,size:0x300,type:'ram'},
|
||||
{name:'BIOS Work RAM',start:0xf300,size:0xd00},
|
||||
],
|
||||
},
|
||||
'sms-sg1000-libcv': {
|
||||
rom_start: 0x0000,
|
||||
@ -236,13 +181,6 @@ var PLATFORM_PARAMS = {
|
||||
'-D', 'NES_MIRRORING=0', // horizontal mirroring
|
||||
],
|
||||
extra_link_files: ['crt0.o', 'neslib2.lib', 'neslib2.cfg', 'nesbanked.cfg'],
|
||||
extra_segments:[
|
||||
//{name:'Work RAM',start:0x0,size:0x800,type:'ram'},
|
||||
{name:'OAM Buffer',start:0x200,size:0x100,type:'ram'},
|
||||
{name:'PPU Registers',start:0x2000,last:0x2008,size:0x2000,type:'io'},
|
||||
{name:'APU Registers',start:0x4000,last:0x4020,size:0x2000,type:'io'},
|
||||
{name:'Cartridge RAM',start:0x6000,size:0x2000,type:'ram'},
|
||||
],
|
||||
},
|
||||
'apple2': {
|
||||
define: '__APPLE2__',
|
||||
@ -250,10 +188,6 @@ var PLATFORM_PARAMS = {
|
||||
libargs: ['apple2.lib'],
|
||||
__CODE_RUN__: 16384,
|
||||
code_start: 0x803,
|
||||
extra_segments:[
|
||||
{name:'I/O',start:0xc000,size:0x1000,type:'io'},
|
||||
{name:'ROM',start:0xd000,size:0x3000-6,type:'rom'},
|
||||
],
|
||||
},
|
||||
'apple2-e': {
|
||||
define: '__APPLE2__',
|
||||
@ -279,13 +213,6 @@ var PLATFORM_PARAMS = {
|
||||
data_start: 0x4e10,
|
||||
data_size: 0x1f0,
|
||||
stack_end: 0x5000,
|
||||
extra_segments:[
|
||||
{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'},
|
||||
],
|
||||
},
|
||||
'astrocade-arcade': {
|
||||
code_start: 0x0000,
|
||||
@ -306,42 +233,14 @@ var PLATFORM_PARAMS = {
|
||||
cfgfile: 'atari7800.cfg',
|
||||
libargs: ['crt0.o', 'sim6502.lib'],
|
||||
extra_link_files: ['crt0.o', 'atari7800.cfg'],
|
||||
extra_segments:[
|
||||
{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
|
||||
{name:'Cartridge ROM',start:0x4000,size:0xc000,type:'rom'},
|
||||
],
|
||||
},
|
||||
'c64': {
|
||||
define: '__C64__',
|
||||
cfgfile: 'c64.cfg', // SYS 2058
|
||||
libargs: ['c64.lib'],
|
||||
//extra_link_files: ['c64-cart.cfg'],
|
||||
extra_segments:[
|
||||
{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'},
|
||||
],
|
||||
},
|
||||
'kim1': {
|
||||
extra_segments:[
|
||||
{name:'RAM', start:0x0000,size:0x1400,type:'ram'},
|
||||
{name:'6530', start:0x1700,size:0x0040,type:'io'},
|
||||
{name:'6530', start:0x1740,size:0x0040,type:'io'},
|
||||
{name:'RAM', start:0x1780,size:0x0080,type:'ram'},
|
||||
{name:'BIOS', start:0x1800,size:0x0800,type:'rom'},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@ -896,13 +795,11 @@ function assembleDASM(step:BuildStep) {
|
||||
lst.lines = [];
|
||||
}
|
||||
}
|
||||
var segments = step.params.extra_segments;
|
||||
return {
|
||||
output:aout,
|
||||
listings:listings,
|
||||
errors:errors,
|
||||
symbolmap:symbolmap,
|
||||
segments:segments
|
||||
};
|
||||
}
|
||||
|
||||
@ -1077,7 +974,7 @@ function linkLD65(step:BuildStep) {
|
||||
}
|
||||
// build segment map
|
||||
var seg_re = /^__(\w+)_SIZE__$/;
|
||||
var segments = [].concat(params.extra_segments||[]);
|
||||
var segments = [];
|
||||
segments.push({name:'CPU Stack',start:0x100,size:0x100,type:'ram'});
|
||||
segments.push({name:'CPU Vectors',start:0xfffa,size:0x6,type:'rom'});
|
||||
// TODO: CHR, banks, etc
|
||||
@ -1396,7 +1293,7 @@ function linkSDLDZ80(step:BuildStep)
|
||||
}
|
||||
// build segment map
|
||||
var seg_re = /^s__(\w+)$/;
|
||||
var segments = [].concat(params.extra_segments||[]);
|
||||
var segments = [];
|
||||
// TODO: use stack params for stack segment
|
||||
for (let ident in symbolmap) {
|
||||
let m = seg_re.exec(ident);
|
||||
@ -2042,13 +1939,11 @@ function assembleXASM6809(step:BuildStep) {
|
||||
var asmlines = parseListing(alst, /^\s*([0-9]+) .+ ([0-9A-F]+)\s+\[([0-9 ]+)\]\s+([0-9A-F]+) (.*)/i, 1, 2, 4, 3);
|
||||
var listings = {};
|
||||
listings[step.prefix+'.lst'] = {lines:asmlines, text:alst};
|
||||
var segments = step.params.extra_segments;
|
||||
return {
|
||||
output:aout,
|
||||
listings:listings,
|
||||
errors:errors,
|
||||
symbolmap:symbolmap,
|
||||
segments:segments
|
||||
};
|
||||
}
|
||||
|
||||
@ -2141,13 +2036,11 @@ function assembleNESASM(step:BuildStep) {
|
||||
}
|
||||
}
|
||||
}
|
||||
var segments = step.params.extra_segments;
|
||||
return {
|
||||
output:aout,
|
||||
listings:listings,
|
||||
errors:errors,
|
||||
symbolmap:symbolmap,
|
||||
segments:segments
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user