mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-18 03:05:35 +00:00
8 lines
40 KiB
Plaintext
8 lines
40 KiB
Plaintext
{
|
|
"version": 3,
|
|
"sources": ["../src/machine/astrocade.ts", "../src/platform/astrocade.ts"],
|
|
"sourcesContent": ["\nimport { Z80, Z80State } from \"../common/cpu/ZilogZ80\";\nimport { BasicScanlineMachine, AcceptsPaddleInput, Bus } from \"../common/devices\";\nimport { KeyFlags, newAddressDecoder, padBytes, Keys, makeKeycodeMap, newKeyboardHandler } from \"../common/emu\";\nimport { TssChannelAdapter, MasterAudio, AY38910_Audio } from \"../common/audio\";\nimport { hex, rgb2bgr, lzgmini, stringToByteArray } from \"../common/util\";\n\n// http://metopal.com/projects/ballybook/doku.php\n\n// TODO: fix keys, more controllers, vibrato/noise, border color\n// http://atariage.com/forums/topic/251416-programming-the-bally-arcadeastrocade/\n// https://ballyalley.com/faqs/BPA%20Video%20Hardware%20FAQ/Bally_Professional_Arcade_Video_Hardware%20(2001)(Tony%20Miller).pdf\n// https://atariage.com/forums/topic/290858-notes-from-a-2019-interview-with-jamie-fenton/ (http://www.fentonia.com/bio/)\n// https://thehistoryofhowweplay.wordpress.com/2018/04/03/interview-tom-mchugh/\n// https://ballyalley.com/faqs/Programmers%20of%20the%20Astrocade%20Built-In%20Programs.txt\n\nconst ASTROCADE_KEYCODE_MAP = makeKeycodeMap([\n // player 1\n [Keys.UP, 0x10, 0x1],\n [Keys.DOWN, 0x10, 0x2],\n [Keys.LEFT, 0x10, 0x4],\n [Keys.RIGHT, 0x10, 0x8],\n [Keys.A, 0x10, 0x10],\n // player 2\n [Keys.P2_UP, 0x11, 0x1],\n [Keys.P2_DOWN, 0x11, 0x2],\n [Keys.P2_LEFT, 0x11, 0x4],\n [Keys.P2_RIGHT, 0x11, 0x8],\n [Keys.P2_A, 0x11, 0x10],\n // keypad $14\n [Keys.VK_P, 0x14, 0x1],\n [Keys.VK_SLASH, 0x14, 0x2],\n [Keys.VK_X, 0x14, 0x4],\n [Keys.VK_MINUS, 0x14, 0x8],\n [Keys.VK_COMMA, 0x14, 0x10],\n [Keys.VK_EQUALS, 0x14, 0x20],\n // keypad $15\n [Keys.VK_O, 0x15, 0x1],\n [Keys.VK_L, 0x15, 0x2],\n [Keys.VK_9, 0x15, 0x4],\n [Keys.VK_6, 0x15, 0x8],\n [Keys.VK_3, 0x15, 0x10],\n [Keys.VK_PERIOD, 0x15, 0x20],\n // keypad $16\n [Keys.VK_I, 0x16, 0x1],\n [Keys.VK_K, 0x16, 0x2],\n [Keys.VK_8, 0x16, 0x4],\n [Keys.VK_5, 0x16, 0x8],\n [Keys.VK_2, 0x16, 0x10],\n [Keys.VK_0, 0x16, 0x20],\n // keypad $17\n [Keys.VK_U, 0x17, 0x1],\n [Keys.VK_J, 0x17, 0x2],\n [Keys.VK_7, 0x17, 0x4],\n [Keys.VK_4, 0x17, 0x8],\n [Keys.VK_1, 0x17, 0x10],\n [Keys.VK_BACK_SLASH, 0x17, 0x20],\n]);\n\nconst audioOversample = 2;\n\nconst _BallyAstrocade = function(arcade:boolean) {\n\n var cpu : Z80;\n var ram : Uint8Array;\n var membus, iobus : Bus;\n var rom, bios;\n var pixels;\n var psg;\n //var watchdog_counter;\n const swidth = arcade ? 320 : 160;\n const sheight = arcade ? 204 : 102;\n const swbytes = swidth >> 2;\n const INITIAL_WATCHDOG = 256;\n const PIXEL_ON = 0xffeeeeee;\n const PIXEL_OFF = 0xff000000;\n\n // state variables\n var inputs = new Uint8Array(0x20);\n var magicop = 0;\n var xpand = 0;\n var xplower = false;\n var shift2 = 0;\n var horcb = 0;\n var inmod = 0;\n var inlin = 0;\n var infbk = 0;\n var verbl = sheight;\n var palette = new Uint32Array(8);\n var palinds = new Uint8Array(8);\n var refreshlines = 0;\n var dirtylines = new Uint8Array(arcade ? 262 : 131);\n var vidactive = false;\n var rotdata = new Uint8Array(4);\n var rotcount = 0;\n var intst = 0;\n var waitstates = 0;\n\n\n function ramwrite(a: number, v: number) {\n // set RAM\n ram[a] = v;\n waitstates++;\n // mark scanline as dirty\n dirtylines[((a & 0xfff) / swbytes) | 0] = 1;\n // this was old behavior where we updated instantly\n // but it had problems if we had mid-screen palette changes\n //ramupdate(a, v);\n }\n\n function ramupdate(a: number, v: number) {\n var ofs = a * 4 + 3; // 4 pixels per byte\n for (var i = 0; i < 4; i++) {\n var lr = ((a % swbytes) >= (horcb & 0x3f)) ? 0 : 4;\n pixels[ofs--] = palette[lr + (v & 3)];\n v >>= 2;\n }\n }\n\n function refreshline(y: number) {\n var ofs = y * swidth / 4;\n for (var i = 0; i < swidth / 4; i++)\n ramupdate(ofs + i, ram[ofs + i]);\n }\n\n function magicwrite(a: number, v: number) {\n // expand\n if (magicop & 0x8) {\n var v2 = 0;\n if (!xplower)\n v >>= 4;\n for (var i = 0; i < 4; i++) {\n var pix = (v & 1) ? ((xpand >> 2) & 3) : (xpand & 3);\n v2 |= pix << (i * 2);\n v >>= 1;\n }\n v = v2;\n xplower = !xplower;\n }\n // rotate\n if (magicop & 0x4) {\n if (rotcount & 4) {\n // drain buffer\n var sh = 2 * (~rotcount & 3);\n v = (((rotdata[3] >> sh) & 3) << 6) |\n (((rotdata[2] >> sh) & 3) << 4) |\n (((rotdata[1] >> sh) & 3) << 2) |\n (((rotdata[0] >> sh) & 3) << 0);\n } else {\n // fill buffer\n rotdata[rotcount & 3] = v;\n }\n rotcount++;\n } else {\n // shift\n var sh = (magicop & 3) << 1;\n var v2 = (v >> sh) | shift2;\n shift2 = (v << (8 - sh)) & 0xff;\n v = v2;\n }\n // flop\n if (magicop & 0x40) {\n v =\n ((v & 0x03) << 6) |\n ((v & 0x0c) << 2) |\n ((v & 0x30) >> 2) |\n ((v & 0xc0) >> 6);\n }\n // or/xor\n if (magicop & 0x30) {\n var oldv = ram[a];\n // collision detect\n var icpt = 0;\n if ((oldv & 0xc0) && (v & 0xc0)) icpt |= 0x1;\n if ((oldv & 0x30) && (v & 0x30)) icpt |= 0x2;\n if ((oldv & 0x0c) && (v & 0x0c)) icpt |= 0x4;\n if ((oldv & 0x03) && (v & 0x03)) icpt |= 0x8;\n // apply op\n if (magicop & 0x10)\n v |= oldv;\n if (magicop & 0x20)\n v ^= oldv; // TODO: what if both?\n // upper 4 bits persist, lower are just since last write\n intst = (intst & 0xf0) | icpt | (icpt << 4);\n }\n // commit write to ram/screen\n ramwrite(a, v);\n }\n\n function setpalette(a: number, v: number) {\n palinds[a & 7] = v & 0xff;\n palette[a & 7] = ASTROCADE_PALETTE[v & 0xff];\n refreshall();\n }\n\n function setbordercolor() {\n var col = horcb >> 6;\n // TODO\n }\n\n function refreshall() {\n refreshlines = sheight;\n }\n \n this.drawScanline = (sl:number) => {\n // interrupt\n if (sl == inlin && (inmod & 0x8)) {\n cpu.retryInterrupts = !(inmod & 0x4);\n this.probe && this.probe.logInterrupt(infbk);\n cpu.interrupt(infbk);\n }\n // refresh this line in frame buffer?\n if (sl < sheight && refreshlines > 0) {\n dirtylines[sl] = 0;\n refreshline(sl);\n refreshlines--;\n }\n else if (dirtylines[sl]) {\n dirtylines[sl] = 0;\n refreshline(sl);\n }\n }\n \n this.init = (machine:BallyAstrocade, c:Z80, r:Uint8Array, inp:Uint8Array, psgg) => {\n cpu = c;\n ram = r;\n inputs = inp;\n psg = psgg;\n //bios = padBytes(ASTROCADE_MINIMAL_BIOS, 0x2000);\n bios = padBytes(new lzgmini().decode(stringToByteArray(atob(ASTROLIBRE_BIOS_LZG))), 0x2000);\n if (!arcade) {\n // game console\n membus = {\n read: newAddressDecoder([\n [0x0000, 0x1fff, 0x1fff, function(a) { return bios[a]; }],\n [0x2000, 0x3fff, 0x1fff, function(a) { return rom ? rom[a] : 0; }],\n [0x4000, 0x4fff, 0xfff, function(a) { waitstates++; return ram[a]; }],\n ]),\n write: newAddressDecoder([\n [0x4000, 0x4fff, 0xfff, ramwrite],\n [0x0000, 0x3fff, 0xfff, magicwrite],\n ]),\n }\n } else {\n // arcade game (TODO: wait states 1/4 of the time)\n membus = {\n read: newAddressDecoder([\n [0x4000, 0x7fff, 0x3fff, function(a) { return ram[a]; }],\t// screen RAM\n [0xd000, 0xdfff, 0xfff, function(a) { return ram[a + 0x4000]; }], // static RAM\n [0x0000, 0xafff, 0xffff, function(a) { return rom ? rom[a] : 0; }], // ROM (0-3fff,8000-afff)\n ]),\n write: newAddressDecoder([\n [0x4000, 0x7fff, 0x3fff, ramwrite],\n [0xd000, 0xdfff, 0xfff, function(a, v) { ramwrite(a + 0x4000, v); }], // static RAM\n [0x0000, 0x3fff, 0x3fff, magicwrite],\n ]),\n }\n }\n iobus = {\n read: function(addr) {\n addr &= 0x1f;\n var rtn;\n switch (addr) {\n case 8:\n rtn = intst;\n intst = 0;\n break;\n default:\n rtn = inputs[addr];\n break;\n // $10 = watchdog\n }\n return rtn;\n },\n write: function(addr, val) {\n addr &= 0x1f;\n val &= 0xff;\n switch (addr) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n setpalette(addr, val);\n break;\n case 9: // HORCB (horizontal boundary byte)\n horcb = val;\n setbordercolor();\n refreshall();\n break;\n case 0xa: // VERBL (vertical blank)\n verbl = arcade ? val : val >> 1;\n refreshall();\n break;\n case 0xb: // OTIR (set palette)\n var c = cpu.saveState();\n //console.log(c.BC>>8, c.HL);\n setpalette((c.BC >> 8) - 1, membus.read(c.HL));\n break;\n case 0xc: // magic register\n magicop = val;\n shift2 = 0;\n rotcount = 0;\n xplower = false;\n break;\n case 0xd: // INFBK (interrupt feedback)\n infbk = val;\n break;\n case 0xe: // INMOD (interrupt enable)\n inmod = val;\n break;\n case 0xf: // INLIN (interrupt line)\n inlin = arcade ? val : val >> 1;\n break;\n case 0x10:\n case 0x11:\n case 0x12:\n case 0x13:\n case 0x14:\n case 0x15:\n case 0x16:\n case 0x17:\n psg.setACRegister(addr, val);\n break;\n case 0x18:\n var c = cpu.saveState();\n psg.setACRegister((c.BC >> 8) - 1, membus.read(c.HL));\n break;\n case 0x19: // XPAND\n xpand = val;\t\n break;\n default:\n console.log('IO write', hex(addr, 4), hex(val, 2));\n break;\n }\n }\n }\n machine.connectCPUMemoryBus(membus);\n machine.connectCPUIOBus(iobus);\n this.membus = membus;\n this.iobus = iobus;\n // default palette\n for (var i = 0; i < 8; i++) {\n setpalette(i,i);\n }\n };\n\n this.resetWaitStates = function(sl) {\n var n = sl < verbl ? waitstates : 0; // only wait if video active\n waitstates = 0;\n return n;\n }\n\n this.loadState = (state) => {\n cpu.loadState(state.c);\n ram.set(state.ram);\n palette.set(state.palette);\n palinds.set(state.palinds);\n magicop = state.magicop;\n xpand = state.xpand;\n xplower = state.xplower;\n shift2 = state.shift2;\n horcb = state.horcb;\n inmod = state.inmod;\n inlin = state.inlin;\n infbk = state.infbk;\n verbl = state.verbl;\n rotcount = state.rotcount;\n rotdata.set(state.rotdata);\n intst = state.intst;\n inputs.set(state.inputs);\n refreshall();\n }\n \n this.saveState = () => {\n return {\n c: cpu.saveState(),\n ram: ram.slice(0),\n inputs: inputs.slice(0),\n palette: palette.slice(0),\n palinds: palinds.slice(0),\n magicop: magicop,\n xpand: xpand,\n xplower: xplower,\n shift2: shift2,\n horcb: horcb,\n inmod: inmod,\n inlin: inlin,\n infbk: infbk,\n verbl: verbl,\n rotcount: rotcount,\n rotdata: rotdata.slice(0),\n intst: intst\n };\n }\n this.reset = () => {\n // TODO?\n magicop = xpand = inmod = inlin = infbk = shift2 = horcb = 0;\n verbl = sheight;\n xplower = false;\n //watchdog_counter = INITIAL_WATCHDOG;\n }\n \n this.toLongString = (st) => {\n var s = \"\";\n //s += \" Scan Y: \" + st.sl;\n s += \"\\n INLIN: \" + st.inlin;\n s += \"\\n VERBL: \" + st.verbl;\n s += \"\\nMAGICOP: $\" + hex(st.magicop);\n s += \"\\n XPAND: $\" + hex(st.xpand);\n s += \"\\nXPLOWER: \" + st.xplower;\n s += \"\\n SHIFT2: $\" + hex(st.shift2);\n s += \"\\n HORCB: $\" + hex(st.horcb);\n s += \"\\n INMOD: $\" + hex(st.inmod);\n s += \"\\n INFBK: $\" + hex(st.infbk);\n s += \"\\n INTST: $\" + hex(st.intst); // intercept status\n s += \"\\nPalette: \";\n for (var i = 0; i < 8; i++)\n s += hex(palinds[i]);\n s += \"\\n\";\n return s;\n }\n \n this.connectVideo = function(pix) {\n pixels = pix;\n }\n this.loadROM = function(data) {\n rom = data;\n }\n this.loadBIOS = function(data) {\n bios = data;\n }\n this.getVisiblePixelWords = function() {\n return verbl * swidth;\n }\n}\n\nexport class BallyAstrocade extends BasicScanlineMachine implements AcceptsPaddleInput {\n \n cpuFrequency = 1789000;\n numTotalScanlines = 262;\n numVisibleScanlines : number;\n cpuCyclesPerLine : number;\n defaultROMSize : number;\n canvasWidth : number;\n sampleRate = 60 * 262 * audioOversample;\n ram : Uint8Array;\n cpu : Z80;\n m; // _BallyAstrocade\n\n psg: AstrocadeAudio;\n audioadapter;\n backbuffer : Uint32Array;\n frontbuffer : Uint32Array;\n\n constructor(arcade:boolean) {\n super();\n this.cpu = new Z80();\n this.psg = new AstrocadeAudio(new MasterAudio());\n this.audioadapter = new TssChannelAdapter(this.psg.psg, audioOversample, this.sampleRate);\n this.handler = newKeyboardHandler(this.inputs, ASTROCADE_KEYCODE_MAP);\n this.defaultROMSize = arcade ? 0xb000 : 0x2000;\n this.ram = new Uint8Array(arcade ? 0x5000 : 0x1000);\n this.numVisibleScanlines = arcade ? 204 : 102;\n this.canvasWidth = arcade ? 320 : 160;\n this.cpuCyclesPerLine = (this.cpuFrequency / (60 * this.numVisibleScanlines * 1.286)) | 0;\n //this.cpuCyclesPerHBlank = Math.floor(this.cpuCyclesPerLine * 0.33);\n //this.cpuCyclesPerVisible = this.cpuCyclesPerLine - this.cpuCyclesPerHBlank;\n this.m = new _BallyAstrocade(arcade);\n this.m.init(this, this.cpu, this.ram, this.inputs, this.psg);\n }\n \n read(a:number) : number {\n return this.m.membus.read(a);\n }\n write(a:number, v:number) : void {\n this.m.membus.write(a,v);\n }\n \n connectVideo(pixels:Uint32Array) : void {\n super.connectVideo(pixels);\n this.frontbuffer = pixels;\n this.backbuffer = new Uint32Array(pixels.length);\n this.m.connectVideo(this.backbuffer);\n }\n preFrame() {\n this.m.resetWaitStates(0);\n }\n postFrame() {\n // copy back buffer to front buffer, omitting bottom non-visible pixels\n var nbytes = this.m.getVisiblePixelWords();\n this.frontbuffer.set(this.backbuffer.slice(0, nbytes), 0);\n this.frontbuffer.fill(0, nbytes);\n }\n\n setPaddleInput(controller:number, value:number) : void {\n switch (controller) {\n case 0: this.inputs[0x1c] = value & 0xff; break;\n case 1: this.inputs[0x1d] = value & 0xff; break;\n }\n }\n\n startScanline() {\n this.audio && this.audioadapter.generate(this.audio);\n }\n \n drawScanline() {\n var sl = this.scanline;\n this.m.drawScanline(sl);\n /*\n if (watchdog_counter-- <= 0) {\n console.log(\"WATCHDOG FIRED\"); // TODO: alert on video\n this.reset();\n }\n */\n }\n\n advanceCPU() {\n var clk = super.advanceCPU();\n // TODO: disable 33% of the time (hblank)\n var xtra = this.m.resetWaitStates(this.scanline);\n if (xtra) {\n clk += xtra;\n this.probe.logClocks(xtra);\n }\n return clk;\n }\n\n loadROM(data) {\n super.loadROM(data);\n this.m.loadROM(this.rom);\n this.reset();\n }\n loadBIOS(data) {\n this.m.loadBIOS(padBytes(data, 0x2000));\n this.reset();\n }\n reset() {\n super.reset();\n this.m.reset();\n }\n loadState(state) {\n this.m.loadState(state);\n }\n saveState() {\n return this.m.saveState();\n }\n getDebugCategories() {\n return ['CPU','Stack','Astro'];\n }\n getDebugInfo(category, state) {\n switch (category) {\n case 'Astro': return this.m.toLongString(state);\n }\n }\n\n}\n\n/////\n\n// TODO: https://github.com/mamedev/mame/blob/master/src/devices/sound/astrocde.cpp\nclass AstrocadeAudio extends AY38910_Audio {\n setACRegister(addr: number, val: number) {\n addr &= 0x7;\n val &= 0xff;\n switch (addr) {\n case 0:\n this.psg.setClock(1789000 * 16 / (val + 1));\n this.psg.writeRegisterAY(7, 0x7 ^ 0xff); // disable noise\n break;\n case 1:\n case 2:\n case 3:\n var i = (addr - 1) * 2;\n var j = val * 2 + 1;\n this.psg.writeRegisterAY(i, j & 0xff); // freq lo\n this.psg.writeRegisterAY(i + 1, (j >> 8) & 0xff); // freq hi\n break;\n case 5:\n this.psg.writeRegisterAY(10, val & 0xf); // tone c vol\n break;\n case 6:\n this.psg.writeRegisterAY(8, val & 0xf);\t// tone a vol\n this.psg.writeRegisterAY(9, (val >> 4) & 0xf); // tone b vol\n break;\n }\n }\n}\n\nexport const _BallyArcade = function() {\n this.__proto__ = new (_BallyAstrocade as any)(true);\n // TODO: inputs[0x13] = 0xfe; // dip switch on arcade\n // TODO: arcade controls, bit blit\n var _in = this.saveControlsState();\n _in.in[0x10] = 0xff; // switches\n _in.in[0x13] = 0xfe; // dip switches\n this.loadControlsState(_in);\n}\n\n/////\n\n//http://glankonian.com/~lance/astrocade_palette.html\nvar ASTROCADE_PALETTE = [0x000000, 0x242424, 0x484848, 0x6D6D6D, 0x919191, 0xB6B6B6, 0xDADADA, 0xFFFFFF, 0x2500BB, 0x4900E0, 0x6E11FF, 0x9235FF, 0xB75AFF, 0xDB7EFF, 0xFFA3FF, 0xFFC7FF, 0x4900B0, 0x6D00D5, 0x9201F9, 0xB625FF, 0xDA4AFF, 0xFF6EFF, 0xFF92FF, 0xFFB7FF, 0x6A009F, 0x8E00C3, 0xB300E7, 0xD718FF, 0xFB3CFF, 0xFF61FF, 0xFF85FF, 0xFFA9FF, 0x870087, 0xAB00AB, 0xD000D0, 0xF40EF4, 0xFF32FF, 0xFF56FF, 0xFF7BFF, 0xFF9FFF, 0x9F006A, 0xC3008E, 0xE700B3, 0xFF07D7, 0xFF2CFB, 0xFF50FF, 0xFF74FF, 0xFF99FF, 0xB00049, 0xD5006D, 0xF90092, 0xFF05B6, 0xFF29DA, 0xFF4DFF, 0xFF72FF, 0xFF96FF, 0xBB0025, 0xE00049, 0xFF006E, 0xFF0692, 0xFF2AB7, 0xFF4FDB, 0xFF73FF, 0xFF98FF, 0xBF0000, 0xE30024, 0xFF0048, 0xFF0B6D, 0xFF3091, 0xFF54B6, 0xFF79DA, 0xFF9DFF, 0xBB0000, 0xE00000, 0xFF0023, 0xFF1447, 0xFF396C, 0xFF5D90, 0xFF82B5, 0xFFA6D9, 0xB00000, 0xD50000, 0xF90000, 0xFF2124, 0xFF4548, 0xFF6A6C, 0xFF8E91, 0xFFB3B5, 0x9F0000, 0xC30000, 0xE70C00, 0xFF3003, 0xFF5527, 0xFF794B, 0xFF9E70, 0xFFC294, 0x870000, 0xAB0000, 0xD01E00, 0xF44200, 0xFF670A, 0xFF8B2E, 0xFFAF53, 0xFFD477, 0x6A0000, 0x8E0D00, 0xB33100, 0xD75600, 0xFB7A00, 0xFF9E17, 0xFFC33B, 0xFFE75F, 0x490000, 0x6D2100, 0x924500, 0xB66A00, 0xDA8E00, 0xFFB305, 0xFFD729, 0xFFFC4E, 0x251100, 0x493500, 0x6E5A00, 0x927E00, 0xB7A300, 0xDBC700, 0xFFEB1E, 0xFFFF43, 0x002500, 0x244900, 0x486D00, 0x6D9200, 0x91B600, 0xB6DB00, 0xDAFF1B, 0xFFFF3F, 0x003700, 0x005B00, 0x238000, 0x47A400, 0x6CC900, 0x90ED00, 0xB5FF1E, 0xD9FF43, 0x004700, 0x006C00, 0x009000, 0x24B400, 0x48D900, 0x6CFD05, 0x91FF29, 0xB5FF4E, 0x005500, 0x007900, 0x009D00, 0x03C200, 0x27E600, 0x4BFF17, 0x70FF3B, 0x94FF5F, 0x005F00, 0x008300, 0x00A800, 0x00CC00, 0x0AF00A, 0x2EFF2E, 0x53FF53, 0x77FF77, 0x006500, 0x008A00, 0x00AE00, 0x00D203, 0x00F727, 0x17FF4B, 0x3BFF70, 0x5FFF94, 0x006800, 0x008C00, 0x00B100, 0x00D524, 0x00F948, 0x05FF6C, 0x29FF91, 0x4EFFB5, 0x006600, 0x008B00, 0x00AF23, 0x00D447, 0x00F86C, 0x00FF90, 0x1EFFB5, 0x43FFD9, 0x006100, 0x008524, 0x00AA48, 0x00CE6D, 0x00F391, 0x00FFB6, 0x1BFFDA, 0x3FFFFE, 0x005825, 0x007C49, 0x00A16E, 0x00C592, 0x00EAB7, 0x00FFDB, 0x1EFFFF, 0x43FFFF, 0x004B49, 0x00706D, 0x009492, 0x00B9B6, 0x00DDDA, 0x05FFFF, 0x29FFFF, 0x4EFFFF, 0x003C6A, 0x00608E, 0x0085B3, 0x00A9D7, 0x00CEFB, 0x17F2FF, 0x3BFFFF, 0x5FFFFF, 0x002A87, 0x004FAB, 0x0073D0, 0x0097F4, 0x0ABCFF, 0x2EE0FF, 0x53FFFF, 0x77FFFF, 0x00179F, 0x003BC3, 0x0060E7, 0x0384FF, 0x27A8FF, 0x4BCDFF, 0x70F1FF, 0x94FFFF, 0x0002B0, 0x0027D5, 0x004BF9, 0x2470FF, 0x4894FF, 0x6CB9FF, 0x91DDFF, 0xB5FFFF, 0x0000BB, 0x0013E0, 0x2337FF, 0x475BFF, 0x6C80FF, 0x90A4FF, 0xB5C9FF, 0xD9EDFF];\n// swap palette RGB to BGR\nfor (var i = 0; i < 256; i++) {\n var x = ASTROCADE_PALETTE[i];\n ASTROCADE_PALETTE[i] = rgb2bgr(x) | 0xff000000;\n}\n\n/*\n0000 F3 [ 4] 196 \tDI\t; disable interrupts\n0001 21 00 20 [10] 197 \tLD\tHL,#0x2000\n0004 7E [ 7] 198 \tLD\tA,(HL) ; A <- mem[0x2000]\n0005 FE 55 [ 7] 199 \tCP\t#0x55 ; found sentinel byte? ($55)\n0007 CA 0D 00 [10] 200 \tJP\tZ,FoundSentinel ; yes, load program\n000A C3 00 20 [10] 201 \tJP\t_main ; jump to test program\n000D 202 \tFoundSentinel:\n000D 31 CE 4F [10] 203 \tLD\tSP,#0x4fce ; position stack below BIOS vars\n0010 CD 84 02 [17] 204 \tCALL\t_bios_init ; misc. bios init routines\n0013 21 05 20 [10] 205 \tLD\tHL,#0x2005 ; cartridge start vector\n0016 7E [ 7] 206 \tLD\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jWwhjk+5dYyfvXWInNusA3X7r3Zbp0usbYxnTDN1+7V0igDb2YxDwt8r5Gt1+80oDBkNKAwChNuwA3W7oJgAp3X7sXSJyNv9jH/6V3X7/nOInGu6A8l8bSgQE4X7dd+rdNPcgA900+F0DhFzdfvXdlv7dd/Hdfvbdnv9dIs5+/N2G8V1CSH793Y7yXUND+d1m+t1+6nfdfvFdItpjE/JdItxjDGMk+V0GJPpdCyQYUl0CVIb+Y5b23Y5dCijxXQYo8t1u8d1m8mNo3TT5XQKQXRtM3TTsZUHDChpKAwBK6DBt3XH53Tb6AN1e891W9BNKBAW9Rl0D0iFdA9L5b10D0Ppn3X78hWME/YxnXSSncBgfY1mGY9mO+md93Yb8b3zdjv1dBhkMGJzdfvdKAweP+F1iAk7sXQZlXQJXLl0EV10mMV0Dw10lMV0E1fJdB9U2ABgsXQRkXSYDXQPNXRXfNgBjEsYoXUME/UoEApo068PbGV2LAkoGEKIKSgYQ50oDD+gJGm8TSgMPsgddBwRKAxC2xc09XQ03O0oXBeVKAxBTCUoDBnX9Yzvdfv2V/XcASgMQWF0PDkoHBeLFzfAbXQNZ8cHR1cX1r2+wBhAgBAYIeSnLERcwARkQ98npSgwNON1OCN1GCWlgC3y1KAfdfgYSExjy3W4E3WYFSg4F413IPGPxXWKX/t1dYpT/XQo9E10EhX5KBg9JEhMY5uHlXQvuAWWBfgsHOEDdywgm3csJFt3LCmVhCxZdAl6WCF0CXp4JXQJYngpdAlieCzASYxY+Yx4eYyZlYQgeGAQESBi6XRYoOCRdBRJ3BF0FFXddA6hjGHcGY9vddwddDkxBDXi3IKxdBfVd4xRKCAJvZR9lH2UfZR9lG2UB`;\n\n", "\nimport { BallyAstrocade } from \"../machine/astrocade\";\nimport { BaseZ80MachinePlatform } from \"../common/baseplatform\";\nimport { Platform } from \"../common/baseplatform\";\nimport { PLATFORMS } from \"../common/emu\";\n\n// http://metopal.com/projects/ballybook/doku.php\n\nconst ASTROCADE_PRESETS = [\n { id: '01-helloworlds.asm', name: 'Hello World (ASM)' },\n { id: '02-telephone.asm', name: 'Telephone (ASM)' },\n { id: '03-horcbpal.asm', name: 'Paddle Demo (ASM)' },\n { id: 'hello.c', name: 'Hello Graphics' },\n { id: 'lines.c', name: 'Lines' },\n { id: 'sprites.c', name: 'Sprites' },\n { id: 'vsync.c', name: 'Sprites w/ VSYNC' },\n { id: 'fastsprites.c', name: 'Fast Sprites' },\n { id: 'music.c', name: 'Music' },\n { id: 'rotate.c', name: 'Rotate Op' },\n { id: 'rainbow.c', name: 'Rainbow' },\n { id: 'cosmic.c', name: 'Cosmic Impalas Game' },\n { id: 'racing.c', name: 'Pseudo 3-D Racing Game' },\n];\n\nconst ASTROCADE_BIOS_PRESETS = [\n { id: 'bios.c', name: 'BIOS' },\n];\n\nclass BallyAstrocadePlatform extends BaseZ80MachinePlatform<BallyAstrocade> implements Platform {\n\n newMachine() { return new BallyAstrocade(false); }\n getPresets() { return ASTROCADE_PRESETS; }\n getDefaultExtension() { return \".c\"; };\n readAddress(a) { return this.machine.read(a); }\n getMemoryMap = function() { return { main:[\n {name:'BIOS',start:0x0,size:0x2000,type:'rom'},\n //{name:'Cart ROM',start:0x2000,size:0x2000,type:'rom'},\n //{name:'Magic RAM',start:0x0,size:0x4000,type:'ram'},\n {name:'Screen RAM',start:0x4000,size:0x1000,type:'ram'},\n {name:'BIOS Variables',start:0x4fce,size:0x5000-0x4fce,type:'ram'},\n ] } };\n showHelp() { return \"https://8bitworkshop.com/docs/platforms/astrocade/\"; }\n}\n\nclass BallyAstrocadeBIOSPlatform extends BallyAstrocadePlatform implements Platform {\n\n getPresets() { return ASTROCADE_BIOS_PRESETS; }\n loadROM(title,rom) { this.machine.loadBIOS(rom); }\n\n}\n\nclass BallyArcadePlatform extends BallyAstrocadePlatform implements Platform {\n\n newMachine() { return new BallyAstrocade(true); }\n\n getMemoryMap = function() { return { main:[\n {name:'Magic RAM',start:0x0,size:0x4000,type:'ram'},\n {name:'Screen RAM',start:0x4000,size:0x4000,type:'ram'},\n ] } };\n}\n\nPLATFORMS['astrocade'] = BallyAstrocadePlatform;\nPLATFORMS['astrocade-bios'] = BallyAstrocadeBIOSPlatform;\nPLATFORMS['astrocade-arcade'] = BallyArcadePlatform;\n\n"],
|
|
"mappings": "wNAgBA,GAAM,IAAwB,GAAe,CAE3C,CAAC,EAAK,GAAI,GAAM,GAChB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,MAAO,GAAM,GACnB,CAAC,EAAK,EAAG,GAAM,IAEf,CAAC,EAAK,MAAO,GAAM,GACnB,CAAC,EAAK,QAAS,GAAM,GACrB,CAAC,EAAK,QAAS,GAAM,GACrB,CAAC,EAAK,SAAU,GAAM,GACtB,CAAC,EAAK,KAAM,GAAM,IAElB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,SAAU,GAAM,GACtB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,SAAU,GAAM,GACtB,CAAC,EAAK,SAAU,GAAM,IACtB,CAAC,EAAK,UAAW,GAAM,IAEvB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,IAClB,CAAC,EAAK,UAAW,GAAM,IAEvB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,IAClB,CAAC,EAAK,KAAM,GAAM,IAElB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,GAClB,CAAC,EAAK,KAAM,GAAM,IAClB,CAAC,EAAK,cAAe,GAAM,MAGvB,GAAkB,E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