1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-15 14:07:16 +00:00
8bitworkshop/gen/vectrex-TWK4AXGJ.js.map

8 lines
47 KiB
Plaintext

{
"version": 3,
"sources": ["../src/platform/vectrex.ts"],
"sourcesContent": ["\nimport { Platform, BaseZ80Platform, Base6502Platform, Base6809Platform } from \"../common/baseplatform\";\nimport { PLATFORMS, newAddressDecoder, padBytes, noise, setKeyboardFromMap, AnimationTimer, VectorVideo, Keys, makeKeycodeMap } from \"../common/emu\";\nimport { hex, lzgmini, stringToByteArray, safe_extend } from \"../common/util\";\nimport { MasterAudio, AY38910_Audio } from \"../common/audio\";\nimport { ProbeRecorder } from \"../common/probe\";\nimport { NullProbe, Probeable, ProbeAll } from \"../common/devices\";\n\n// emulator from https://github.com/raz0red/jsvecx\n// https://roadsidethoughts.com/vectrex/vectrex-memory-map.htm\n// http://www.playvectrex.com/designit/chrissalo/memorymap.htm\n// http://vectrexmuseum.com/share/coder/other/TEXT/VECTREX/INTERNAL.TXT\n// http://vide.malban.de/help/vectrex-tutorial-ii-starting-with-bios\n// http://www.playvectrex.com/designit/chrissalo/bios.asm\n// https://www.6809.org.uk/asm6809/doc/asm6809.shtml\n// http://www.playvectrex.com/\n// http://vectrexmuseum.com/vectrexhistory.php\n\nvar VECTREX_PRESETS = [\n { id: 'hello.xasm', name: 'Hello World (ASM)' },\n { id: 'hello.c', name: 'Hello World (CMOC)' },\n { id: 'joystick.c', name: 'Joystick Test (CMOC)' },\n { id: 'threed.c', name: '3D Transformations (CMOC)' },\n]\n\n// TODO: player 2\nvar VECTREX_KEYCODE_MAP = makeKeycodeMap([\n [Keys.LEFT, 0, 0x01],\n [Keys.RIGHT, 0, 0x02],\n [Keys.DOWN, 0, 0x04],\n [Keys.UP, 0, 0x08],\n [Keys.GP_B, 2, 0x01],\n [Keys.GP_A, 2, 0x02],\n [Keys.GP_D, 2, 0x04],\n [Keys.GP_C, 2, 0x08],\n\n [Keys.P2_LEFT, 1, 0x01],\n [Keys.P2_RIGHT, 1, 0x02],\n [Keys.P2_DOWN, 1, 0x04],\n [Keys.P2_UP, 1, 0x08],\n [Keys.P2_GP_B, 2, 0x10],\n [Keys.P2_GP_A, 2, 0x20],\n [Keys.P2_GP_D, 2, 0x40],\n [Keys.P2_GP_C, 2, 0x80],\n]);\n\n//\n\nclass VIA6522 {\n vectrex: VectrexPlatform;\n constructor(vectrex) {\n this.vectrex = vectrex;\n }\n\n //static unsigned via_ora;\n ora = 0;\n //static unsigned via_orb;\n orb = 0;\n //static unsigned via_ddra;\n ddra = 0;\n //static unsigned via_ddrb;\n ddrb = 0;\n //static unsigned via_t1on; /* is timer 1 on? */\n t1on = 0;\n //static unsigned via_t1int; /* are timer 1 interrupts allowed? */\n t1int = 0;\n //static unsigned via_t1c;\n t1c = 0;\n //static unsigned via_t1ll;\n t1ll = 0;\n //static unsigned via_t1lh;\n t1lh = 0;\n //static unsigned via_t1pb7; /* timer 1 controlled version of pb7 */\n t1pb7 = 0;\n //static unsigned via_t2on; /* is timer 2 on? */\n t2on = 0;\n //static unsigned via_t2int; /* are timer 2 interrupts allowed? */\n t2int = 0;\n //static unsigned via_t2c;\n t2c = 0;\n //static unsigned via_t2ll;\n t2ll = 0;\n //static unsigned via_sr;\n sr = 0;\n //static unsigned via_srb; /* number of bits shifted so far */\n srb = 0;\n //static unsigned via_src; /* shift counter */\n src = 0;\n //static unsigned via_srclk;\n srclk = 0;\n //static unsigned via_acr;\n acr = 0;\n //static unsigned via_pcr;\n pcr = 0;\n //static unsigned via_ifr;\n ifr = 0;\n //static unsigned via_ier;\n ier = 0;\n //static unsigned via_ca2;\n ca2 = 0;\n //static unsigned via_cb2h; /* basic handshake version of cb2 */\n cb2h = 0;\n //static unsigned via_cb2s; /* version of cb2 controlled by the shift register */\n cb2s = 0;\n\n reset() {\n // http://archive.6502.org/datasheets/mos_6522_preliminary_nov_1977.pdf\n // \"Reset sets all registers to zero except t1 t2 and sr\"\n this.ora = 0;\n this.orb = 0;\n this.ddra = 0;\n this.ddrb = 0;\n this.t1on = 0;\n this.t1int = 0;\n this.t1c = 0;\n this.t1ll = 0;\n this.t1lh = 0;\n this.t1pb7 = 0x80;\n this.t2on = 0;\n this.t2int = 0;\n this.t2c = 0;\n this.t2ll = 0;\n this.sr = 0;\n this.srb = 8;\n this.src = 0;\n this.srclk = 0;\n this.acr = 0;\n this.pcr = 0;\n this.ifr = 0;\n this.ier = 0;\n this.ca2 = 1;\n this.cb2h = 1;\n this.cb2s = 0;\n };\n\n int_update() {\n if ((this.ifr & 0x7f) & (this.ier & 0x7f)) {\n this.ifr |= 0x80;\n }\n else {\n this.ifr &= 0x7f;\n }\n }\n\n step0() {\n var t2shift = 0;\n if (this.t1on) {\n this.t1c = (this.t1c > 0 ? this.t1c - 1 : 0xffff);\n if ((this.t1c & 0xffff) == 0xffff) {\n /* counter just rolled over */\n if (this.acr & 0x40) {\n /* continuous interrupt mode */\n this.ifr |= 0x40;\n this.int_update();\n this.t1pb7 ^= 0x80;\n /* reload counter */\n this.t1c = (this.t1lh << 8) | this.t1ll;\n }\n else {\n /* one shot mode */\n if (this.t1int) {\n this.ifr |= 0x40;\n this.int_update();\n this.t1pb7 = 0x80;\n this.t1int = 0;\n }\n }\n }\n }\n\n if (this.t2on && (this.acr & 0x20) == 0x00) {\n this.t2c = (this.t2c > 0 ? this.t2c - 1 : 0xffff);\n if ((this.t2c & 0xffff) == 0xffff) {\n /* one shot mode */\n if (this.t2int) {\n this.ifr |= 0x20;\n this.int_update();\n this.t2int = 0;\n }\n }\n }\n\n /* shift counter */\n this.src = (this.src > 0 ? this.src - 1 : 0xff); // raz was 0xffffffff\n if ((this.src & 0xff) == 0xff) {\n this.src = this.t2ll;\n if (this.srclk) {\n t2shift = 1;\n this.srclk = 0;\n }\n else {\n t2shift = 0;\n this.srclk = 1;\n }\n }\n else {\n t2shift = 0;\n }\n\n if (this.srb < 8) {\n switch (this.acr & 0x1c) {\n case 0x00:\n /* disabled */\n break;\n case 0x04:\n /* shift in under control of t2 */\n if (t2shift) {\n /* shifting in 0s since cb2 is always an output */\n this.sr <<= 1;\n this.srb++;\n }\n break;\n case 0x08:\n /* shift in under system clk control */\n this.sr <<= 1;\n this.srb++;\n break;\n case 0x0c:\n /* shift in under cb1 control */\n break;\n case 0x10:\n /* shift out under t2 control (free run) */\n if (t2shift) {\n this.cb2s = (this.sr >> 7) & 1;\n this.sr <<= 1;\n this.sr |= this.cb2s;\n }\n break;\n case 0x14:\n /* shift out under t2 control */\n if (t2shift) {\n this.cb2s = (this.sr >> 7) & 1;\n this.sr <<= 1;\n this.sr |= this.cb2s;\n this.srb++;\n }\n break;\n case 0x18:\n /* shift out under system clock control */\n this.cb2s = (this.sr >> 7) & 1;\n this.sr <<= 1;\n this.sr |= this.cb2s;\n this.srb++;\n break;\n case 0x1c:\n /* shift out under cb1 control */\n break;\n }\n\n if (this.srb == 8) {\n this.ifr |= 0x04;\n this.int_update();\n }\n }\n }\n\n step1() {\n if ((this.pcr & 0x0e) == 0x0a) {\n /* if ca2 is in pulse mode, then make sure\n * it gets restored to '1' after the pulse.\n */\n this.ca2 = 1;\n }\n if ((this.pcr & 0xe0) == 0xa0) {\n /* if cb2 is in pulse mode, then make sure\n * it gets restored to '1' after the pulse.\n */\n this.cb2h = 1;\n }\n }\n\n read(address) {\n var data;\n /* io */\n switch (address & 0xf) {\n case 0x0:\n /* compare signal is an input so the value does not come from\n * orb.\n */\n if (this.acr & 0x80) {\n /* timer 1 has control of bit 7 */\n data = ((this.orb & 0x5f) | this.t1pb7 | this.vectrex.alg.compare);\n }\n else {\n /* bit 7 is being driven by orb */\n data = ((this.orb & 0xdf) | this.vectrex.alg.compare);\n }\n return data & 0xff;\n case 0x1:\n /* register 1 also performs handshakes if necessary */\n if ((this.pcr & 0x0e) == 0x08) {\n /* if ca2 is in pulse mode or handshake mode, then it\n * goes low whenever ira is read.\n */\n this.ca2 = 0;\n }\n /* fall through */\n case 0xf:\n if ((this.orb & 0x18) == 0x08) {\n /* the snd chip is driving port a */\n data = this.vectrex.psg.readData();\n //console.log(this.vectrex.psg.currentRegister(), data);\n }\n else {\n data = this.ora;\n }\n return data & 0xff;\n case 0x2:\n return this.ddrb & 0xff;\n case 0x3:\n return this.ddra & 0xff;\n case 0x4:\n /* T1 low order counter */\n data = this.t1c;\n this.ifr &= 0xbf; /* remove timer 1 interrupt flag */\n this.t1on = 0; /* timer 1 is stopped */\n this.t1int = 0;\n this.t1pb7 = 0x80;\n this.int_update();\n return data & 0xff;\n case 0x5:\n /* T1 high order counter */\n return (this.t1c >> 8) & 0xff;\n case 0x6:\n /* T1 low order latch */\n return this.t1ll & 0xff;\n case 0x7:\n /* T1 high order latch */\n return this.t1lh & 0xff;\n case 0x8:\n /* T2 low order counter */\n data = this.t2c;\n this.ifr &= 0xdf; /* remove timer 2 interrupt flag */\n this.t2on = 0; /* timer 2 is stopped */\n this.t2int = 0;\n this.int_update();\n return data & 0xff;\n case 0x9:\n /* T2 high order counter */\n return (this.t2c >> 8);\n case 0xa:\n data = this.sr;\n this.ifr &= 0xfb; /* remove shift register interrupt flag */\n this.srb = 0;\n this.srclk = 1;\n this.int_update();\n return data & 0xff;\n case 0xb:\n return this.acr & 0xff;\n case 0xc:\n return this.pcr & 0xff;\n case 0xd:\n /* interrupt flag register */\n return this.ifr & 0xff;\n case 0xe:\n /* interrupt enable register */\n return (this.ier | 0x80) & 0xff;\n }\n }\n\n write(address, data) {\n switch (address & 0xf) {\n case 0x0:\n this.orb = data;\n this.vectrex.snd_update();\n this.vectrex.alg.update();\n if ((this.pcr & 0xe0) == 0x80) {\n /* if cb2 is in pulse mode or handshake mode, then it\n * goes low whenever orb is written.\n */\n this.cb2h = 0;\n }\n break;\n case 0x1:\n /* register 1 also performs handshakes if necessary */\n if ((this.pcr & 0x0e) == 0x08) {\n /* if ca2 is in pulse mode or handshake mode, then it\n * goes low whenever ora is written.\n */\n this.ca2 = 0;\n }\n /* fall through */\n case 0xf:\n this.ora = data;\n this.vectrex.snd_update();\n /* output of port a feeds directly into the dac which then\n * feeds the x axis sample and hold.\n */\n this.vectrex.alg.xsh = data ^ 0x80;\n this.vectrex.alg.update();\n break;\n case 0x2:\n this.ddrb = data;\n break;\n case 0x3:\n this.ddra = data;\n break;\n case 0x4:\n /* T1 low order counter */\n this.t1ll = data;\n break;\n case 0x5:\n /* T1 high order counter */\n this.t1lh = data;\n this.t1c = (this.t1lh << 8) | this.t1ll;\n this.ifr &= 0xbf; /* remove timer 1 interrupt flag */\n this.t1on = 1; /* timer 1 starts running */\n this.t1int = 1;\n this.t1pb7 = 0;\n this.int_update();\n break;\n case 0x6:\n /* T1 low order latch */\n this.t1ll = data;\n break;\n case 0x7:\n /* T1 high order latch */\n this.t1lh = data;\n break;\n case 0x8:\n /* T2 low order latch */\n this.t2ll = data;\n break;\n case 0x9:\n /* T2 high order latch/counter */\n this.t2c = (data << 8) | this.t2ll;\n this.ifr &= 0xdf;\n this.t2on = 1; /* timer 2 starts running */\n this.t2int = 1;\n this.int_update();\n break;\n case 0xa:\n this.sr = data;\n this.ifr &= 0xfb; /* remove shift register interrupt flag */\n this.srb = 0;\n this.srclk = 1;\n this.int_update();\n break;\n case 0xb:\n this.acr = data;\n break;\n case 0xc:\n this.pcr = data;\n if ((this.pcr & 0x0e) == 0x0c) {\n /* ca2 is outputting low */\n this.ca2 = 0;\n }\n else {\n /* ca2 is disabled or in pulse mode or is\n * outputting high.\n */\n this.ca2 = 1;\n }\n if ((this.pcr & 0xe0) == 0xc0) {\n /* cb2 is outputting low */\n this.cb2h = 0;\n }\n else {\n /* cb2 is disabled or is in pulse mode or is\n * outputting high.\n */\n this.cb2h = 1;\n }\n break;\n case 0xd:\n /* interrupt flag register */\n this.ifr &= (~(data & 0x7f)); // & 0xffff ); // raz\n this.int_update();\n break;\n case 0xe:\n /* interrupt enable register */\n if (data & 0x80) {\n this.ier |= data & 0x7f;\n }\n else {\n this.ier &= (~(data & 0x7f)); // & 0xffff ); // raz\n }\n this.int_update();\n break;\n }\n }\n saveState() {\n return safe_extend(null, {}, this);\n }\n loadState(state) {\n safe_extend(null, this, state);\n }\n toLongString(state) {\n var s = \"\";\n for (var key in state) {\n s += key + \": \" + hex(state[key]) + \"\\n\";\n }\n return s;\n }\n};\n\nconst Globals =\n{\n VECTREX_MHZ: 1500000, /* speed of the vectrex being emulated */\n VECTREX_COLORS: 128, /* number of possible colors ... grayscale */\n ALG_MAX_X: 33000,\n ALG_MAX_Y: 41000,\n //VECTREX_PDECAY: 30, /* phosphor decay rate */\n //VECTOR_HASH: 65521,\n SCREEN_X_DEFAULT: 900,\n SCREEN_Y_DEFAULT: 1100,\n BOUNDS_MIN_X: 0,\n BOUNDS_MAX_X: 30000,\n BOUNDS_MIN_Y: 41000,\n BOUNDS_MAX_Y: 0,\n};\n\nclass VectrexAnalog {\n vectrex: VectrexPlatform;\n constructor(vectrex) {\n this.vectrex = vectrex;\n }\n videoEnabled = true;\n //static unsigned rsh; /* zero ref sample and hold */\n rsh = 0;\n //static unsigned xsh; /* x sample and hold */\n xsh = 0;\n //static unsigned ysh; /* y sample and hold */\n ysh = 0;\n //static unsigned zsh; /* z sample and hold */\n zsh = 0;\n //unsigned jch0;\t\t /* joystick direction channel 0 */\n jch0 = 0;\n //unsigned jch1;\t\t /* joystick direction channel 1 */\n jch1 = 0;\n //unsigned jch2;\t\t /* joystick direction channel 2 */\n jch2 = 0;\n //unsigned jch3;\t\t /* joystick direction channel 3 */\n jch3 = 0;\n //static unsigned jsh; /* joystick sample and hold */\n jsh = 0;\n //static unsigned compare;\n compare = 0;\n //static long dx; /* delta x */\n dx = 0;\n //static long dy; /* delta y */\n dy = 0;\n //static long curr_x; /* current x position */\n curr_x = 0;\n //static long curr_y; /* current y position */\n curr_y = 0;\n\n max_x = Globals.ALG_MAX_X >> 1;\n max_y = Globals.ALG_MAX_Y >> 1;\n\n //static unsigned vectoring; /* are we drawing a vector right now? */\n vectoring = false;\n //static long vector_x0;\n vector_x0 = 0;\n //static long vector_y0;\n vector_y0 = 0;\n //static long vector_x1;\n vector_x1 = 0;\n //static long vector_y1;\n vector_y1 = 0;\n //static long vector_dx;\n vector_dx = 0;\n //static long vector_dy;\n vector_dy = 0;\n //static unsigned char vector_color;\n vector_color = 0;\n\n reset() {\n this.rsh = 128;\n this.xsh = 128;\n this.ysh = 128;\n this.zsh = 0;\n this.jch0 = 128;\n this.jch1 = 128;\n this.jch2 = 128;\n this.jch3 = 128;\n this.jsh = 128;\n this.compare = 0;\n /* check this */\n this.dx = 0;\n this.dy = 0;\n this.curr_x = Globals.ALG_MAX_X >> 1;\n this.curr_y = Globals.ALG_MAX_Y >> 1;\n this.vectoring = false;\n }\n\n update() {\n var via = this.vectrex.via;\n switch (via.orb & 0x06) {\n case 0x00:\n this.jsh = this.jch0;\n if ((via.orb & 0x01) == 0x00) {\n /* demultiplexor is on */\n this.ysh = this.xsh;\n }\n break;\n case 0x02:\n this.jsh = this.jch1;\n if ((via.orb & 0x01) == 0x00) {\n /* demultiplexor is on */\n this.rsh = this.xsh;\n }\n break;\n case 0x04:\n this.jsh = this.jch2;\n if ((via.orb & 0x01) == 0x00) {\n /* demultiplexor is on */\n if (this.xsh > 0x80) {\n this.zsh = this.xsh - 0x80;\n } else {\n this.zsh = 0;\n }\n }\n break;\n case 0x06:\n /* sound output line */\n this.jsh = this.jch3;\n break;\n }\n\n /* compare the current joystick direction with a reference */\n if (this.jsh > this.xsh) {\n this.compare = 0x20;\n } else {\n this.compare = 0;\n }\n\n /* compute the new \"deltas\" */\n this.dx = this.xsh - this.rsh;\n this.dy = this.rsh - this.ysh;\n }\n\n step() {\n var via = this.vectrex.via;\n var sig_dx = 0;\n var sig_dy = 0;\n var sig_ramp = 0;\n var sig_blank = 0;\n\n if (via.acr & 0x10) {\n sig_blank = via.cb2s;\n }\n else {\n sig_blank = via.cb2h;\n }\n\n if (via.ca2 == 0)\n {\n /* need to force the current point to the 'orgin' so just\n * calculate distance to origin and use that as dx,dy.\n */\n sig_dx = this.max_x - this.curr_x;\n sig_dy = this.max_y - this.curr_y;\n }\n else {\n if (via.acr & 0x80) {\n sig_ramp = via.t1pb7;\n }\n else {\n sig_ramp = via.orb & 0x80;\n }\n\n if (sig_ramp == 0) {\n sig_dx = this.dx;\n sig_dy = this.dy;\n }\n else {\n sig_dx = 0;\n sig_dy = 0;\n }\n }\n //if (sig_dx || sig_dy) console.log(via.ca2, this.curr_x, this.curr_y, this.dx, this.dy, sig_dx, sig_dy, sig_ramp, sig_blank);\n\n if (!this.vectoring) {\n if (sig_blank == 1 &&\n this.curr_x >= 0 && this.curr_x < Globals.ALG_MAX_X &&\n this.curr_y >= 0 && this.curr_y < Globals.ALG_MAX_Y) {\n /* start a new vector */\n this.vectoring = true;\n this.vector_x0 = this.curr_x;\n this.vector_y0 = this.curr_y;\n this.vector_x1 = this.curr_x;\n this.vector_y1 = this.curr_y;\n this.vector_dx = sig_dx;\n this.vector_dy = sig_dy;\n this.vector_color = this.zsh & 0xff;\n }\n }\n else {\n /* already drawing a vector ... check if we need to turn it off */\n if (sig_blank == 0) {\n /* blank just went on, vectoring turns off, and we've got a\n * new line.\n */\n this.vectoring = false;\n\n this.addline(this.vector_x0, this.vector_y0,\n this.vector_x1, this.vector_y1,\n this.vector_color);\n }\n else if (sig_dx != this.vector_dx ||\n sig_dy != this.vector_dy ||\n (this.zsh & 0xff) != this.vector_color) {\n\n /* the parameters of the vectoring processing has changed.\n * so end the current line.\n */\n this.addline(this.vector_x0, this.vector_y0,\n this.vector_x1, this.vector_y1,\n this.vector_color);\n\n /* we continue vectoring with a new set of parameters if the\n * current point is not out of limits.\n */\n\n if (this.curr_x >= 0 && this.curr_x < Globals.ALG_MAX_X &&\n this.curr_y >= 0 && this.curr_y < Globals.ALG_MAX_Y) {\n this.vector_x0 = this.curr_x;\n this.vector_y0 = this.curr_y;\n this.vector_x1 = this.curr_x;\n this.vector_y1 = this.curr_y;\n this.vector_dx = sig_dx;\n this.vector_dy = sig_dy;\n this.vector_color = this.zsh & 0xff;\n }\n else {\n this.vectoring = false;\n }\n }\n }\n\n this.curr_x += sig_dx;\n this.curr_y += sig_dy;\n\n if (this.vectoring &&\n this.curr_x >= 0 && this.curr_x < Globals.ALG_MAX_X &&\n this.curr_y >= 0 && this.curr_y < Globals.ALG_MAX_Y) {\n /* we're vectoring ... current point is still within limits so\n * extend the current vector.\n */\n this.vector_x1 = this.curr_x;\n this.vector_y1 = this.curr_y;\n }\n }\n\n addline(x0, y0, x1, y1, color) {\n if (!this.videoEnabled) return;\n // TODO\n //console.log(x0, y0, x1, y1, color);\n x0 = (x0 - Globals.BOUNDS_MIN_X) / (Globals.BOUNDS_MAX_X - Globals.BOUNDS_MIN_X) * Globals.SCREEN_X_DEFAULT;\n x1 = (x1 - Globals.BOUNDS_MIN_X) / (Globals.BOUNDS_MAX_X - Globals.BOUNDS_MIN_X) * Globals.SCREEN_X_DEFAULT;\n y0 = (y0 - Globals.BOUNDS_MIN_Y) / (Globals.BOUNDS_MAX_Y - Globals.BOUNDS_MIN_Y) * Globals.SCREEN_Y_DEFAULT;\n y1 = (y1 - Globals.BOUNDS_MIN_Y) / (Globals.BOUNDS_MAX_Y - Globals.BOUNDS_MIN_Y) * Globals.SCREEN_Y_DEFAULT;\n this.vectrex.video.drawLine(x0, y0, x1, y1, color, 7);\n }\n\n saveState() {\n return safe_extend(null, {}, this);\n }\n loadState(state) {\n safe_extend(null, this, state);\n }\n toLongString(state) {\n var s = \"\";\n for (var key in state) {\n s += key + \": \" + state[key] + \"\\n\";\n }\n return s;\n }\n}\n\n//\n\nclass VectrexPlatform extends Base6809Platform {\n\n mainElement;\n via: VIA6522;\n alg: VectrexAnalog;\n ram: Uint8Array;\n rom: Uint8Array;\n bios: Uint8Array;\n inputs: Uint8Array;\n bus;\n video: VectorVideo;\n psg: AY38910_Audio;\n audio;\n timer: AnimationTimer;\n\n constructor(mainElement) {\n super();\n this.mainElement = mainElement;\n }\n\n getPresets() {\n return VECTREX_PRESETS;\n }\n\n start() {\n this.via = new VIA6522(this);\n this.alg = new VectrexAnalog(this);\n this.bios = padBytes(new lzgmini().decode(stringToByteArray(atob(VECTREX_FASTROM_LZG))), 0x2000);\n this.ram = new Uint8Array(0x400);\n this.inputs = new Uint8Array(4);\n var mbus = {\n read: newAddressDecoder([\n [0x0000, 0x7fff, 0, (a) => { return this.rom && this.rom[a]; }],\n [0xc800, 0xcfff, 0x3ff, (a) => { return this.ram[a]; }],\n [0xd000, 0xdfff, 0xf, (a) => { return this.via.read(a); }],\n [0xe000, 0xffff, 0x1fff, (a) => { return this.bios && this.bios[a]; }],\n ]),\n\n write: newAddressDecoder([\n [0xc800, 0xcfff, 0x3ff, (a, v) => { this.ram[a] = v; }],\n [0xd000, 0xd7ff, 0x3ff, (a, v) => { this.via.write(a & 0xf, v); }],\n [0xd800, 0xdfff, 0x3ff, (a, v) => { this.ram[a] = v; this.via.write(a & 0xf, v); }],\n ])\n };\n this.bus = {\n read: (a) => { var v = mbus.read(a); this.probe.logRead(a,v); return v; },\n write: (a,v) => { this.probe.logWrite(a,v); mbus.write(a,v); }\n };\n this._cpu = this.newCPU(this.bus);\n // create video/audio\n this.video = new VectorVideo(this.mainElement, Globals.SCREEN_X_DEFAULT, Globals.SCREEN_Y_DEFAULT);\n this.video.persistenceAlpha = 0.2;\n this.audio = new MasterAudio();\n this.psg = new AY38910_Audio(this.audio);\n this.video.create();\n this.timer = new AnimationTimer(60, this.nextFrame.bind(this));\n setKeyboardFromMap(this.video, this.inputs, VECTREX_KEYCODE_MAP); // true = always send function);\n }\n\n // TODO: loadControlsState\n updateControls() {\n // joystick (analog simulation)\n this.alg.jch0 = (this.inputs[0] & 0x1) ? 0x00 : (this.inputs[0] & 0x2) ? 0xff : 0x80;\n this.alg.jch1 = (this.inputs[0] & 0x4) ? 0x00 : (this.inputs[0] & 0x8) ? 0xff : 0x80;\n this.alg.jch2 = (this.inputs[1] & 0x1) ? 0x00 : (this.inputs[1] & 0x2) ? 0xff : 0x80;\n this.alg.jch3 = (this.inputs[1] & 0x4) ? 0x00 : (this.inputs[1] & 0x8) ? 0xff : 0x80;\n // buttons (digital)\n this.psg.psg.register[14] = ~this.inputs[2];\n }\n\n advance(novideo:boolean) : number {\n if (!novideo) this.video.clear();\n this.alg.videoEnabled = !novideo;\n this.updateControls();\n this.probe.logNewFrame();\n var frameCycles = 1500000 / 60;\n var cycles = 0;\n while (cycles < frameCycles) {\n cycles += this.nextCycle();\n }\n return cycles;\n }\n\n nextCycle() {\n this.probe.logExecute(this.getPC(), this.getSP());\n if (this.via.ifr & 0x80) {\n this._cpu.interrupt();\n }\n var n = this.runCPU(this._cpu, 1);\n if (n == 0) n = 1; // TODO?\n this.probe.logClocks(n);\n for (var i=0; i<n; i++) {\n this.via.step0();\n this.alg.step();\n this.via.step1();\n }\n return n;\n }\n\n snd_update() {\n switch (this.via.orb & 0x18) {\n case 0x00:\n /* the sound chip is disabled */\n break;\n case 0x08:\n /* the sound chip is sending data */\n break;\n case 0x10:\n /* the sound chip is recieving data */\n if (this.psg.curreg != 14) {\n this.psg.setData(this.via.ora);\n }\n break;\n case 0x18:\n /* the sound chip is latching an address */\n if ((this.via.ora & 0xf0) == 0x00) {\n this.psg.selectRegister(this.via.ora & 0x0f);\n }\n break;\n }\n }\n\n getCPUState() {\n return this._cpu.saveState();\n }\n\n loadROM(title, data) {\n this.rom = padBytes(data, 0x8000);\n this.reset();\n }\n\n loadBIOS(title, data) {\n this.bios = padBytes(data, 0x2000);\n this.reset();\n }\n\n isRunning() {\n return this.timer.isRunning();\n }\n pause() {\n this.timer.stop();\n this.audio.stop();\n }\n resume() {\n this.timer.start();\n this.audio.start();\n }\n reset() {\n this._cpu.reset();\n this.via.reset();\n this.alg.reset();\n }\n readAddress(addr: number) {\n return ((addr & 0xf000) != 0xd000) ? this.bus.read(addr) : null; // ignore I/O space\n }\n\n loadState(state) {\n this._cpu.loadState(state.c);\n this.ram.set(state.b);\n this.via.loadState(state.via);\n this.alg.loadState(state.alg);\n this.loadControlsState(state);\n }\n saveState() {\n return {\n c: this.getCPUState(),\n b: this.ram.slice(0),\n via: this.via.saveState(),\n alg: this.alg.saveState(),\n in: this.inputs.slice(0)\n };\n }\n loadControlsState(state) {\n this.inputs.set(state.in);\n }\n saveControlsState() {\n return {\n in: this.inputs.slice(0)\n };\n }\n\n getMemoryMap() {\n return {\n main: [\n { name: 'Cartridge ROM', start: 0x0000, size: 0x8000, type: 'rom' },\n { name: 'RAM', start: 0xc800, size: 0x400, type: 'ram' },\n { name: 'I/O Registers', start: 0xd000, size: 0x80, type: 'io' },\n { name: 'BIOS', start: 0xe000, size: 0x2000, type: 'rom' },\n ]\n }\n };\n\n getDebugCategories() {\n return super.getDebugCategories().concat(['VIA6522','ANALOG']);\n }\n getDebugInfo(category, state) {\n switch (category) {\n case 'VIA6522': return this.via.toLongString(state.via);\n case 'ANALOG': return this.alg.toLongString(state.alg);\n default: return super.getDebugInfo(category, state);\n }\n }\n\n // probing\n nullProbe = new NullProbe();\n probe : ProbeAll = this.nullProbe;\n\n startProbing?() : ProbeRecorder {\n var rec = new ProbeRecorder(this);\n this.connectProbe(rec);\n return rec;\n }\n stopProbing?() : void {\n this.connectProbe(null);\n }\n connectProbe(probe:ProbeAll) {\n this.probe = probe || this.nullProbe;\n }\n}\n\n//\n\nPLATFORMS['vectrex'] = VectrexPlatform;\n\nvar VECTREX_FASTROM_LZG = `TFpHAAAgAAAAG/A3SzUgAXSsbrHtd/hQMOhNSU5FgPhQAN5TVE9STYAAjsiDb4CMy8Um+b3o43zIJIa7t8iAjgEBv8iBrAUTcCb5IAC98a/MAgC996kKeQ9WD5uOyKi9+E+OyK+xo/mxocwAAb34fI7JAKwIBO2rn8SfxoYFl9mX2pfbICS96GYQjsjElpuupjAEr6aO7aduA4amBYQDJgIM2W7tvefkbtuGpoQrBb3hKSBB3PCDAAHd8CcUNAi98aq96s/O7i+96p01CJYPJySOyKjOy+u9+NiOyK9uwdzwECb/RL3xiw87EM7L6n7wHG4w6vC95R694mK95Li941M1CL3rQ73sRr3slb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