← All cores
jchan (decoryah)
Says it was checked against the original PCB — 1
- README.md:141 **Not compared with the arcade PCB.** MAME is the reference; the driver itself says that parts of this hardware are not understood (`docs/hardware.md` marks wha
Reports a measurement taken on the original PCB — 1
- README.md:122 The pixel clock of the board is 28.636363 MHz / 4 = 7.159 MHz and the raster 460 x 261 dots (320 x 240 visible), 59.63 Hz (the PCB's measured 59.60 Hz, 15.556 k
Cites MAME source — 55
- Jchan.sv:5 Written for MiSTer from MAME 0.289's driver (src/mame/kaneko/jchan.cpp, kaneko_spr.cpp, kaneko_toybox.cpp, view2.cpp, ymz280b.cpp).
- Jchan.sv:173 keyboard: 1 / 2 start, 5 / 6 coin, 9 service, F1 / F2 test, T tilt (MAME's defaults)
- Jchan.sv:219 file's second half, MAME's word swap undone by address bit 0) MRA index 2: the 93C46 image (128 bytes, little-endian words), saved by the HPS after the game stored it.
- rtl/jchan_board.sv:1 Jackie Chan board, everything the two 68000s see behind their buses (MAME 0.289 jchan.cpp): address decode of both maps, the work RAMs, the shared RAM, mcuram + toybox, the I/O ports, the sprite-list / register / tile / palette memories wit
- rtl/jchan_board.sv:18 f00000-f00007 R P1 P2 SYSTEM EXTRA / W bit 15 = sub CPU interrupt enable f80000 watchdog Everything else reads 0 and ignores writes (MAME's unmapped space).
- rtl/jchan_board.sv:26 Frame snapshot (docs/memory.md section 5): MAME draws the frame at line 240 (the start of the vblank, before its `vblank` callback copies both sprite lists), from the tile RAM, palette and registers as they are at that instant.
- rtl/jchan_board.sv:80 input ports (MAME's values: active low, bits 15:8 used)
- rtl/jchan_board.sv:87 toybox data ROM loader (MAME region order, 128 KB) and the 93C46 image
- rtl/jchan_board.sv:272 palette and VIEW2 tile RAM: live RAM for the CPU + a display copy (jchan_snapram) that is a snapshot of the live RAM at line 240, the instant MAME draws the frame; the picture is scanned out during the next frame.
- rtl/jchan_board.sv:399 ctrl_w(u16 data): the bit of the word as MAME hands it over (upper lane absent = 0)
- rtl/jchan_core.sv:27 toybox data ROM loader (MAME region order) and the 93C46 image
- rtl/jchan_core.sv:38 inputs (MAME's values)
- rtl/jchan_io.sv:1 Input ports of the Jackie Chan board as the 68000 reads them (jchan.cpp INPUT_PORTS_START(jchan)): the four words at f00000-f00006 from the players' buttons, and the DSW1 word the toybox hands over.
- rtl/jchan_io.sv:2 Everything is active low in MAME's port words, bits 15:8 only (the low byte reads 0).
- rtl/jchan_io.sv:4 joy1 / joy2 {B4, B3, B2, B1, right, left, down, up}, 1 = pressed start / coin / test / service / tilt 1 = pressed; a coin is stretched to COIN_FRAMES frames (MAME's PORT_IMPULSE(2): the 60 Hz scan of the game must see it) dsw1
- rtl/jchan_m68k.sv:8 iack one clock when the CPU starts the acknowledge cycle of level iack_lvl: the board clears that level's latch (MAME's HOLD_LINE: the line stays asserted until the CPU takes it).
- rtl/jchan_mem.sv:5 0x0400000 YMZ280B samples 3.25 MB (compact: MAME region 0x000000-0x0fffff, 0x200000-0x43ffff; the 0x100000 mirror is folded away) 0x1000000 sprite chip 1 ROM (SPA) up to 32 MB window, 22.5 MB used 0x3000000 sprite chip 2 ROM
- rtl/jchan_mem.sv:192 The MAME region (16 MB) is stored compact: the 1 MB at 0x100000 mirrors the one at 0 and the rest above 0x200000 is moved down by 0x100000.
- rtl/jchan_mix.sv:1 jchan final pixel mixer: the tile layers' winning pixel against the two sprite bitmaps (jchan.cpp screen_update's last loop; reference: tools/jchan_spr.py mix()).
- rtl/jchan_snapram.sv:1 A CPU-written RAM with a display copy that is a snapshot taken at one instant (docs/memory.md section 5): the display reads copy D, the CPU reads and writes the live RAM L. MAME draws a frame at the start of the vblank (line 240) from the
- rtl/jchan_spr_band.sv:16 Same clip semantics as MAME's blitters with the clip rectangle = the band (jchan_spr.py draw(clip=...)); the clamp loops make the result equal to the full-frame draw cropped to the band (a step never skips a destination row: zyd <= 1.0).
- rtl/jchan_spr_band.sv:532 ---- zoom blit (MAME's 16.16 DDA, one adder step per clock), clipped to the band's rows
- rtl/jchan_sys.sv:5 Raster events (ev_l11 / ev_l240 / ev_l249) are one-clock strobes at the start of scanline 11 / 240 / 249 of the 460 x 261 raster (jchan.cpp `vblank`); the video's counters or a stand-in make them.
- rtl/jchan_toybox.sv:1 Kaneko "toybox" MCU stand-in (TBS0P01, uPD78324; its firmware was never dumped): the main CPU's mailbox, the four commands MAME's kaneko_toybox.cpp implements, the 64 KB window of the data ROM they read, and the 93C46's 64 words.
- rtl/jchan_toybox.sv:10 timing MAME runs a command instantly.
- rtl/jchan_toybox.sv:10 Here it takes up to ~1.5 K clocks (1 byte / clock); `busy` is high meanwhile and the board holds the main CPU's write cycle (no DTACK) until it drops, so the effect is visible to the next bus access exactly as in MAME.
- rtl/jchan_toybox.sv:16 The data ROM is loaded in MAME's region order (tools/jchan_rom.py "mcudata", 128 KB, ROM_LOAD16_WORD_SWAP already applied) and "decrypted" while it is loaded: region[i] += table[(i ^ 1) & 0xff].
- rtl/jchan_toybox.sv:39 data ROM loader: MAME region image order, undecrypted, 128 KB; the lower 64 KB are ignored
- rtl/jchan_ymz280b.sv:1 Yamaha YMZ280B (8-voice ADPCM / PCM8 / PCM16 player), written from MAME 0.289 devices/sound/ymz280b.cpp, which is its reference: every register, the three decoders, the per-voice linear interpolation and the level / pan maths follow that fi
- rtl/jchan_ymz280b.sv:2 Output: one stereo sample every TICK_CLKS clocks (MAME's stream rate, 16 MHz / 384 * 2 = 83.33 kHz; 96 MHz / 1152), as the 27-bit sum of the voices' `interp * level / 2` terms (`dbg_l` / `dbg_r`, exactly what MAME's `add_int(..., 32768 * 25
- rtl/jchan_ymz280b.sv:6 What is and is not modelled (jchan's board reaches only the write side of the chip: sub 68000 800001 = register select, 800003 = data): modelled voice registers 00-7f, global register ff (key-on enable, the "stop everything" side effect),
- rtl/jchan_ymz280b.sv:12 How MAME's chunked stream is mapped onto a sample-by-sample machine (the argument is in docs/sound.md): * MAME generates samples in chunks that end at every data-port write and every 1/50 s (sound manager update); a write at stream index N
- rtl/jchan_ymz280b.sv:16 * at a chunk start MAME parks idle voices (not playing, last two samples zero) at output_pos = 1.0 and skips them; the "ramp to zero" that fills the rest of a chunk after the end of a sample (t = t * 15 / 16 per decoded sample) ends at the
- rtl/jchan_ymz280b.sv:19 * the interpolation position is advanced eagerly (right after an output that wrapped it) as MAME does, so a chunk always ends with output_pos < 1.0.
- rtl/jchan_ymz280b.sv:27 the stream rate MAME uses (integer part of 16 MHz / 192); 50 Hz timer events derive from it
- rtl/jchan_ymz280b.sv:81 MAME's sound manager updates every stream at k / 50 s (k >= 1); a stream index N = floor(k * TIMER_RATE / 50).
- rtl/jchan_ymz280b.sv:222 the first sample starts a chunk (MAME's first stream update parks the idle voices)
- README.md:3 Kaneko's **Jackie Chan - The Kung-Fu Master** (1995; sets `jchan` rev 4 and `jchana` rev 3) and **Jackie Chan in Fists of Fire** (`jchan2`) for the MiSTer FPGA
- README.md:7 The core was written from MAME 0.289's driver and device sources, with MAME itself as the reference at every step (the state of its video chips, RAMs and snapsh
- README.md:24 Everything else below is simulation and the Quartus tool flow, against MAME 0.289:
- README.md:32 Pictures against MAME's snapshots: **110 of 113 (`jchan`, 1,006 frames), 102 of 103 (`jchana`, 700), 62 of 62 (`jchan2`, 700) pixel-identical** -- boot messages
- README.md:36 The pictures that differ are boot and CPU-timing frames: the video RAM test's colour bars of `jchan` frames 5-7 (324 pixels; the RTL's two CPUs run a few micros
- README.md:41 **Toybox.** `rtl/jchan_toybox.sv` against MAME's: 163 generated cases on each set plus every command a real boot and game start issue (17 / 17 / 33), the whole
- README.md:43 **YMZ280B.** Bit-exact (both channels' 28-bit sums, every sample) against MAME's chip code on a 70 s captured session and on random register stress including PC
- README.md:48 The SDRAM holds exactly the reference image in every loaded window (0 mismatching bytes), the machine is released and boots, and the pictures are MAME's. CRT Ad
- README.md:57 The title screens of the two games, as MAME 0.289 draws them (320 x 240; the core's pictures are compared with MAME's snapshots, see "Status").
- README.md:104 | SW1 | Name | Values | Default (MAME's) |
- README.md:130 The HSync / VSync positions inside the blanking are not measured from the PCB (hsync dots 340-371, vsync lines 244-246); only the totals and the picture are MAM
- README.md:138 **CPU timing.** At some instants (the boot frames listed under "Status") the RTL's two CPUs are a few microseconds apart from MAME's, which shows as a line or a
- README.md:143 The simulation comparisons against MAME cover the boot and the first 12 - 17 s of emulated time of each set from reset (700 to 1,006 frames), and 60 real frames
- README.md:175 `tools/make_mra.py` regenerates the MRAs from MAME's definitions (no ROM file is read).
- README.md:175 The tools need Python 3.8, MAME 0.289 (`JCHAN_MAME`), the merged ROM folder (`JCHAN_ROMS`) and, for the benches, Verilator 5 and a C++ compiler in WSL or Linux;
- README.md:178 The whole-core bench simulates the machine from reset against MAME's dumps:
- README.md:179 `py -3.8 tools/sys_compare.py <set> mame|rtl|cmp|pic` (`docs/cpu_side.md`).
- README.md:183 **The MAME team** -- the driver and device sources everything here was derived from and checked against: `jchan.cpp` (David Haywood), `kaneko_rlespr.cpp` (David
Says it matches, follows or was checked against MAME — 2
- rtl/jchan_view2.sv:3 Specification and executable reference: tools/jchan_tiles.py (checked pixel for pixel against MAME's snapshots).
- README.md:141 **Not compared with the arcade PCB.** MAME is the reference; the driver itself says that parts of this hardware are not understood (`docs/hardware.md` marks wha
Says it was translated, ported or taken from MAME — 2
- Jchan.sv:164 MAME's DSW1 (SW1:1-8) is the byte at ioctl index 254, bit 0 first = SW1:1; a 1 is MAME's default setting (0xDB).
- README.md:26 **Reference renderer.** `tools/jchan_spr.py` and `tools/jchan_tiles.py` (the RLE sprite chips and the VIEW2 tilemaps, ported from MAME's `kaneko_rlespr.cpp` / `
Keeps a MAME approximation — 1
- rtl/jchan_video.sv:3 dec_start / dec_bank pulse: a sprite list has been latched into list bank dec_bank (the board's copy at line 240): pass 1 of both chips decodes it and stores the sprites in the SDRAM band_start / band_bank pulse, one clock after the sna
Shares text with the MAME driver without saying so — 1