1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-26 10:49:17 +00:00

apple2: repair "DOS fake" bytes after loadROM

This commit is contained in:
Micah Cowan 2022-01-27 22:53:57 -08:00
parent 7071f70bb2
commit fc59dd30c3

View File

@ -119,8 +119,6 @@ export class AppleII extends BasicScanlineMachine implements AcceptsBIOS {
constructor() { constructor() {
super(); super();
this.loadBIOS(new lzgmini().decode(stringToByteArray(atob(APPLEIIGO_LZG)))); this.loadBIOS(new lzgmini().decode(stringToByteArray(atob(APPLEIIGO_LZG))));
this.ram[0xbf00] = 0x4c; // fake DOS detect for C
this.ram[0xbf6f] = 0x01; // fake DOS detect for C
this.connectCPUMemoryBus(this); this.connectCPUMemoryBus(this);
} }
saveState() : AppleIIState { saveState() : AppleIIState {
@ -167,6 +165,8 @@ export class AppleII extends BasicScanlineMachine implements AcceptsBIOS {
this.bios = Uint8Array.from(data); this.bios = Uint8Array.from(data);
this.bios[0xD39A - (0x10000 - this.bios.length)] = 0x60; // $d39a = RTS this.bios[0xD39A - (0x10000 - this.bios.length)] = 0x60; // $d39a = RTS
this.ram.set(this.bios, 0x10000 - this.bios.length); this.ram.set(this.bios, 0x10000 - this.bios.length);
this.ram[0xbf00] = 0x4c; // fake DOS detect for C
this.ram[0xbf6f] = 0x01; // fake DOS detect for C
} }
loadROM(data) { loadROM(data) {
if (data.length == 35*16*256) { // is it a disk image? if (data.length == 35*16*256) { // is it a disk image?