← All cores
Arcade-LethalEnforcers (ppriest)
Notes where it differs from MAME — 1
- rtl/video/lethal_obj.sv:6 jt053244 is the chip modelled from the silicon, not MAME's k053244: where its output differs from MAME's frames, the difference is recorded in docs/MAME_KLUDGES.md ("Vendored modules that disagree with MAME") and kept.
Cites MAME source — 61
- LethalEnforcers.sv:265 MAME's ORIENTATION_FLIP_X (else FLIP_Y)
- LethalEnforcers.sv:487 288 x 224 on a 4:3 screen (lethal.cpp's set_raw; the aspect is the monitor's), 3:4 when the HDMI rotation turns it
- rtl/io/gx_keyboard.sv:1 MAME's default keys (src/emu/inpttype.ipp), in hps_io's J1 joystick layout so they OR into the pads: right, left, down, up at bits 0-3, buttons 1-6 at 4-9, Start 10, Coin 11, Pause 12, Service 13.
- rtl/io/gx_keyboard.sv:13 MAME's Service 1, 2
- rtl/io/lethal_guns.sv:3 Lethal Enforcers' light guns, as lethal.cpp reads them (guns_r, gunsaux_r):
- rtl/io/lethal_guns.sv:8 with v the 0-255 value of MAME's LIGHTGUN port.
- rtl/io/lethal_guns.sv:111 MAME's GUNX / GUNY, as tables
- rtl/lethal_main.sv:3 Lethal Enforcers' main CPU board: the HD63C09E run as a 6809 (mc6809i in jtframe_sys6809, docs/HARDWARE_NOTES.md "CPUs and chips"), lethal.cpp's main_map and bank4000_map, the ER5911 EEPROM, the 054000 and the 054321's main side.
- rtl/lethal_main.sv:7 main_map (lethal.cpp line 531): 0000-1fff program ROM, 8 KB banks (0x40dc) 2000-3fff work RAM 4000-403f 054156 registers (write) 4040-404f 054157 (write, unused)
- rtl/lethal_main.sv:15 4000-43ff otherwise unmapped; 4400-7fff the bank4000 window: CBNK = 0: 4840-484f 053244, 4880-489f 054000, 48c0-48cf 054321, 5000-57ff 053245, 6000-7fff 054156 VRAM (2 KB planes: code lo, code hi, attr lo, attr hi) CBNK = 1: 4400-7fff pa
- rtl/lethal_main.sv:184 vblank IRQ, HOLD_LINE: held until the CPU takes it (lethal.cpp line 477)
- rtl/lethal_sdram.sv:84 0x400000 MAME's k056832 region
- rtl/lethal_sdram.sv:85 0x200000 MAME's k053244 region, first half
- rtl/lethal_sdram.sv:88 0x200000 MAME's k054539 region
- rtl/lethal_sound.sv:3 Lethal Enforcers' sound board: the Z80B at 6 MHz, its program and RAM, the 054321's sound side and the 054539 (lethal.cpp sound_map, line 573): 0000-efff program ROM (the 64 KB 191A02, in block RAM, loaded with the set) f000-f7ff RAM f800
- rtl/lethal_sound.sv:12 The Z80 tests the 054539's RAM at power-on and reports the result to the main CPU (0x48ca bit 3; MAME reads 0x0f there).
- rtl/video/crt/gx_crt_chain.sv:13 MAME's set_raw, and daiskiss's K053252 (ROADMAP)
- rtl/video/jt053244/lethal_draw6.v:4 Lethal Enforcers change: six bitplanes instead of four, for the pair of 053244s behind one 053245 (lethal.cpp header).
- rtl/video/jt053244/lethal_objdraw_gate6.v:4 Lethal Enforcers change: six bitplanes instead of four, for the pair of 053244s behind one 053245 (lethal.cpp header).
- rtl/video/lethal_mixer.sv:3 Lethal Enforcers' layer mixing and palette, as lethal.cpp screen_update draws: the background pen, layers D, C, B (priority bits 1, 2, 4), the sprites against a priority mask chosen by colour bits 4-5, layer A over everything; then the xBGR
- rtl/video/lethal_mixer.sv:13 A tile pixel is 1024 * bank + 256 * colour + pixel (tile_callback with the gfx element's granularity of 16), which passes 0x2000 for the high banks: MAME then reads its shadow half, and so does this, through the same table.
- rtl/video/lethal_mixer.sv:39 priority masks by sprite colour bits 4-5 (lethal.cpp sprite_callback)
- rtl/video/lethal_obj.sv:10 The wiring follows jtcores' riders core (jtriders_obj.v): the drawer takes ~hflip and SWAPH=1 because the ROM rows are in MAME's bit order (leftmost pixel in bit 7), and the tile number reaches the ROM through the same bit shuffle as MAME's
- rtl/video/lethal_obj.sv:27 lethal.cpp sprite_callback: colour[5:4] picks the priority mask, colour[3:0] plus the PCU3 sprite base the palette block; pen 63 of a shadow sprite is shadow.
- rtl/video/lethal_obj.sv:31 118 puts the unzoomed sprites of a flipped frame (lethalenj) at the same raster position, relative to MAME's bitmap, as an unflipped one's: bitmap = raster + (105, 255) for every unzoomed sprite of every capture (scripts/classify_obj.py)
- rtl/video/lethal_obj.sv:142 code & 0x3fff (lethal.cpp sprite_callback)
- rtl/video/lethal_tilemap.sv:4 Four layers, 8 bpp (MAME's K056832_BPP_8LE).
- rtl/video/lethal_tilemap.sv:6 Derived from gx_tilemap.sv in Arcade-KonamiGX_MiSTer (89124d4), itself written from MAME's k054156_k054157_k056832.cpp.
- rtl/video/lethal_tilemap.sv:7 Changed for this core (GPLv3 5(a)): five VRAM pages instead of sixteen, line scroll from the external page, screen flip in both axes as MAME draws it, the 8LE pixel decode, and Lethal's layer offsets.
- rtl/video/lethal_tilemap.sv:18 COORDINATES are MAME's bitmap's (lethal.cpp line 695): line_y is a bitmap line, 16..239 visible, and the line buffer holds bitmap columns 24..311 at 0..287 -- or 311..24 when lb_rev is set.
- rtl/video/lethal_tilemap.sv:20 Screen flip (register 0 bits 4, 5) follows MAME's tilemap_t: about the visible window's centre, so the flipped map column at bitmap x is (335 - x + scroll) and row (255 - y + scroll).
- rtl/video/lethal_tilemap.sv:22 The cabinet orientation (MAME's ORIENTATION_FLIP_Y / FLIP_X) is the caller's: it chooses which bitmap line to render and the read direction.
- rtl/video/lethal_tilemap.sv:26 NOT HANDLED, flagged on `unsupported` for the line being rendered: a layer more than one page wide or tall (never seen in Lethal; MAME's multi-page flip has its own clipping), line-map pages (register 4), and layer association turned off.
- rtl/video/lethal_tilemap.sv:31 The pen is 1024 * PCU bank + 64 * { colour, 2'b00 } + pixel (lethal.cpp tile_callback with the gfx element's granularity of 16).
- rtl/video/lethal_tilemap.sv:38 054156 registers, byte writes as lethal.cpp maps them (main 0x4000-0x403f): reg_addr[5:1] the word, reg_addr[0] the byte (0 = high)
- rtl/video/lethal_tilemap.sv:145 The first line's pair is dy + corr_y, or 255 under flip Y, rounded down to eight for mode 2; the walk goes down under flip Y. Mode 2 under flip Y reads 0x1e0 + 14 words further (K056832_DRAW_FLAG_MIRROR, which lethal.cpp passes).
- rtl/video/lethal_tilemap.sv:162 Lethal's per-layer X offsets (lethal.cpp screen_update): -4, -2, 0, 2, and 167 less under flip X. The Y offsets are 0.
- rtl/video/lethal_tilemap.sv:166 MAME: ay = (dy + corr_y - offs_y) % height, corr_y the sign-extended 11-bit register 0x3c under flip Y; the X scroll gets corr_x, register 0x3a's 12 bits, under flip X, less the layer offset.
- rtl/video/lethal_video.sv:6 384 x 262 at a 6 MHz pixel (lethal.cpp line 695), counted in display coordinates X 0..383, L 0..261, visible X 24..311, L 16..239.
- rtl/video/lethal_video.sv:7 Each display pixel shows MAME's bitmap pixel x = flip_x ?
- rtl/video/lethal_video.sv:9 255 - L : L where flip_x/flip_y are the cabinet orientation (MAME's ORIENTATION_FLIP_X/Y, from the .mra) and the OSD flip.
- rtl/video/lethal_video.sv:11 The renderers draw MAME's bitmap, the game's own screen flip included; the orientation only chooses which bitmap line is drawn next and which way the line buffers are read.
- rtl/video/lethal_video.sv:19 jt053244 draws at its hs, X = 331 of line L, for line L+2, with vdump = y + 255: the raster mapping measured in sim/obj_tb (MAME bitmap y = vdump - 255).
- rtl/video/lethal_video.sv:34 MAME orientation of the set
- README.md:3 A MiSTer FPGA core for Konami's Lethal Enforcers (GX191) arcade hardware (MAME's `konami/lethal.cpp`), built with Quartus Prime 17.0.2 Lite for the DE10-nano.
- README.md:34 The Lethal Enforcers board: one game, nine sets in MAME, all on the same hardware.
- README.md:46 | Lethal Enforcers (ver UAE) | `lethalen` | 1992 | Konami | The parent. Screen mirrored vertically as in MAME (`ORIENTATION_FLIP_Y`) |
- README.md:51 | Lethal Enforcers (ver EAD) | `lethalenead` | 1992 | Konami | No Language switch, as MAME |
- README.md:62 | 054156 + 2 × 054157 | Four 8 bpp tilemaps | `lethal_tilemap.sv`, derived from KonamiGX's `gx_tilemap`. Every layer pixel of 23 MAME captures matches |
- README.md:64 | Mixer, palette | Priority, shadows, xBGR 555 | Written here from `lethal.cpp` |
- README.md:66 | 054321 | Sound latches, volume | jtcores' `jt054321`; its volume and enables in `lethal_k539.sv`, after MAME |
- README.md:67 | 054539 | PCM sound, reverb | KonamiGX's `gx_k054539` in `lethal_k539.sv`. Within 1 LSB of MAME on every sample measured |
- README.md:73 From `lethal.cpp`'s `set_raw`, whose comment gives 59.638 Hz as measured.
- README.md:196 MAME 0.289 is the accuracy reference, with its own acknowledged uncertainties noted where they matter.
- README.md:199 Main CPU: `mc6809i` against MAME's bus trace, with replayed peripherals, through 36 vblank IRQs: 323,623 writes of 323,623.
- README.md:204 Video against MAME captures of `lethalen`, `lethalenj` and `lethaleneae`: the software model matches on all 23; the tilemap RTL matches the model on every layer
- README.md:207 SDRAM: download and all four ports against MAME's regions with Micron's model, at the board's clock phase: 477 reads of 477.
- README.md:211 Sound: MAME's own 054539 register writes replayed into the RTL, against MAME's audio with its speaker effects off: 99.60% of 541,626 samples exact, all within 1
- README.md:219 The **MAMEdev team** — R. Belmont and Nicola Salmoria for `lethal.cpp`, Olivier Galibert for `k054539.cpp` — for the driver and the device emulations that are t
- README.md:245 | `debug` | reference captures from MAME used as ground truth (gitignored) |
- README.md:246 | `roms` | your own MAME sets (gitignored, never committed) |
Says it matches, follows or was checked against MAME — 7
- rtl/video/lethal_tilemap.sv:10 The specification is scripts/render_model.py draw_layer(), pixel-identical to MAME; scripts/check_tilemap.py is the test.
- README.md:60 | HD63C09E | Main CPU, 3 MHz | `mc6809i` (Greg Miller) in jtcores' `jtframe_sys6809`, run as a 6809: a MAME trace found no 6309-only instructions. Bus trace che
- README.md:63 | 053245 + 2 × 053244 | Sprites, 6 bpp | jtcores' `jt053244`, extended to 6 bpp. Unzoomed sprites match MAME; zoomed ones differ (`docs/MAME_KLUDGES.md`) |
- README.md:165 Sound: matches MAME in simulation, not yet heard on hardware
- README.md:201 Whole board from reset, nothing replayed: the main CPU's first 292,853 writes match MAME's; the first difference is an interrupt taken one instruction later.
- README.md:202 Frame 290 of the run is pixel-identical to MAME's frame 300.
- README.md:212 On the whole board the Z80's 35,126 writes to the 054539 match MAME's in order and value.
Says it was translated, ported or taken from MAME — 1
- README.md:140 `docs/MAME_KLUDGES.md` lists what is taken from MAME as behaviour and what is known not to be right.