mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-12-26 07:29:22 +00:00
fixed atari-vector 6502, pass options=... to platform constructor
This commit is contained in:
parent
d7626be789
commit
0682af1eed
@ -13,6 +13,7 @@ import { SampledAudio } from "./audio";
|
||||
import { ProbeRecorder } from "./recorder";
|
||||
import { BaseWASMMachine } from "./wasmplatform";
|
||||
import { CPU6809 } from "./cpu/6809";
|
||||
import { _MOS6502 } from "./cpu/MOS6502";
|
||||
|
||||
///
|
||||
|
||||
@ -448,7 +449,7 @@ export abstract class Base6502Platform extends BaseDebugPlatform {
|
||||
abstract readAddress(addr:number) : number;
|
||||
|
||||
newCPU(membus : MemoryBus) {
|
||||
var cpu = new jt.M6502();
|
||||
var cpu = new _MOS6502();
|
||||
cpu.connectBus(membus);
|
||||
return cpu;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { CPU, Bus, ClockBased, SavesState, Interruptable } from "../devices";
|
||||
|
||||
// Copyright 2015 by Paulo Augusto Peccin. See license.txt distributed with this file.
|
||||
|
||||
var _MOS6502 = function() {
|
||||
export var _MOS6502 = function() {
|
||||
var self = this;
|
||||
|
||||
this.powerOn = function() {
|
||||
|
@ -30,6 +30,7 @@ declare var $ : JQueryStatic; // use browser jquery
|
||||
|
||||
interface UIQueryString {
|
||||
platform? : string;
|
||||
options?: string;
|
||||
repo? : string;
|
||||
file? : string;
|
||||
electron? : string;
|
||||
@ -2213,7 +2214,9 @@ function installGAHooks() {
|
||||
|
||||
async function startPlatform() {
|
||||
if (!PLATFORMS[platform_id]) throw Error("Invalid platform '" + platform_id + "'.");
|
||||
platform = new PLATFORMS[platform_id]($("#emuscreen")[0]);
|
||||
let emudiv = $("#emuscreen")[0];
|
||||
let options = decodeQueryString(qs.options || '');
|
||||
platform = new PLATFORMS[platform_id](emudiv, options);
|
||||
setPlatformUI();
|
||||
stateRecorder = new StateRecorderImpl(platform);
|
||||
PRESETS = platform.getPresets ? platform.getPresets() : [];
|
||||
|
@ -270,7 +270,7 @@ var AtariColorVectorPlatform = function(mainElement) {
|
||||
clock++;
|
||||
if (--nmicount == 0) {
|
||||
//console.log("NMI", cpu.saveState());
|
||||
var n = cpu.setIRQAndWait(); // TODO: only if I flag set
|
||||
var n = cpu.setIRQ(); // TODO: only if I flag set
|
||||
clock += n;
|
||||
nmicount = cpuCyclesPerNMI - n;
|
||||
//console.log(n, clock, nmicount);
|
||||
|
@ -432,6 +432,10 @@ var WilliamsPlatform = function(mainElement, proto, isDefender) {
|
||||
] } };
|
||||
}
|
||||
|
||||
var Williams6809Platform = function(mainElement) {
|
||||
this.__proto__ = new WilliamsPlatform(mainElement, null, false);
|
||||
}
|
||||
|
||||
var WilliamsZ80Platform = function(mainElement) {
|
||||
this.__proto__ = new WilliamsPlatform(mainElement, BaseZ80Platform, false);
|
||||
|
||||
@ -462,7 +466,7 @@ var WilliamsDefenderPlatform = function(mainElement) {
|
||||
] } };
|
||||
}
|
||||
|
||||
PLATFORMS['williams'] = WilliamsPlatform;
|
||||
PLATFORMS['williams'] = Williams6809Platform;
|
||||
PLATFORMS['williams-defender'] = WilliamsDefenderPlatform;
|
||||
PLATFORMS['williams-z80'] = WilliamsZ80Platform;
|
||||
|
||||
|
Binary file not shown.
@ -8,7 +8,6 @@
|
||||
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
||||
.import zerobss, callmain
|
||||
.import initlib, donelib, copydata
|
||||
.import exit
|
||||
.import __PRGRAM_START__, __PRGRAM_SIZE__ ; Linker generated
|
||||
; .import __STACKSIZE__ ; Linker generated
|
||||
|
||||
@ -30,7 +29,7 @@ start:
|
||||
_exit: pha
|
||||
jsr donelib
|
||||
pla
|
||||
jmp exit
|
||||
jmp start
|
||||
|
||||
nmi:
|
||||
inc $0
|
||||
|
Loading…
Reference in New Issue
Block a user