← コア一覧
PGM2 (decoryah)
MAMEのソースを引用 — 75
- PGM2.sv:5 Written for MiSTer from MAME 0.289's driver (src/mame/igs/pgm2.cpp, pgm2_v.cpp, igs036crypt.cpp, ymz770.cpp).
- PGM2.sv:55 The vertical game (ddpdojt, MAME ROT270; MRA flags bit 2) is turned through a frame buffer in the DDR3 (the framework's screen_rotate, as in the owner's Metro / Gaiapolis cores): with Orientation Vert (the default) the scaler shows that buf
- PGM2.sv:151 IC cards (kov2nl, kov3): the card image files of slots P1 - P4 (OSD "IC Cards", MAME's 264-byte .pg2) as hps_io image slots 0 - 3, one 512-byte block each (pgm2_card.sv)
- PGM2.sv:405 region 9: the files of index 1 (bank 0 l, h, bank 1 l, h) one after the other from COL_BASE; with a bank 1 the colour space is MAME's 512 MB (kof98umh), else as big as bank 0's two files
- PGM2.sv:507 The 320-pixel mode (kof98umh) has dots of 6 clocks (6.67 MHz): its picture then takes 48 us of the line instead of 32, so a CRT or a capture of the raster (the RT4K over DV1) shows it about as wide as the 448 games (MAME shows every mode at
- PGM2.sv:614 YMZ774 (22.5792 MHz / 512 = 44.1 kHz from the 40 MHz clock, rtl/ymz_tick.sv): the mix after the chip's clip limiter, clamped to 16 bits as MAME's stream, held from one sample to the next
- PGM2.sv:695 MAME's ROT270 = rotate_ccw.
- rtl/igs036_aic.sv:5 Interrupt sources are 32 lines: `line_set` pulses mark a line pending, `line_clr` pulses clear it when the line is programmed for it (SMR bit 6, as MAME's set_irq(line, CLEAR_LINE)).
- rtl/igs036_aic.sv:80 MAME: the priority must be >= the current level; midx must be > 0
- rtl/igs036_mcu.sv:1 Card-reader MCU of the PGM2 board, high level model (MAME src/mame/igs/pgm2.cpp "MPU" HLE) and the 2 x 128 byte shared RAM at 0x30100000.
- rtl/igs036_mcu.sv:9 IC card commands 0xc0..0xc9 (byte 1 of the command = slot, bytes 2 / 3 = arguments) on the four card slots of pgm2_card.sv, as MAME's: c0 / c1 card present (status f7, else f4 "no card"), c2 read arg3 card bytes from arg2 into the shared RA
- rtl/igs036_mcu.sv:168 c2 / c3 with no bytes to copy answer f7 even without a card (MAME's loop)
- rtl/pgm2_bg.sv:4 Reference: mister/tools/pgm2_ref.py `compose` (BG block), MAME pgm2_v.cpp.
- rtl/pgm2_bitmap.sv:3 MAME rasterises the sprite list into a bitmap at vblank and shows it one frame later, so the core keeps two bitmaps of 240 rows x 512 pixels x 14 bit {tag, pri, pal[5:0], pen[5:0]} (3.4 Mbit: more than the whole block RAM budget of a MiSTer
- rtl/pgm2_card.sv:1 PGM2 IC card slots: four Siemens SLE 4442 memory cards (MAME src/mame/igs/pgm2_memcard.cpp) for the card-reader MCU model (igs036_mcu.sv), each backed by a card image file that the player mounts from MiSTer's OSD (hps_io sd_* blocks).
- rtl/pgm2_card.sv:4 A card image is MAME's .pg2 layout, 264 bytes: 256 data bytes, 4 protection bytes, 4 security bytes (error counter and the 3-byte password).
- rtl/pgm2_card.sv:6 Main_MiSTer clamps a block write to the file's size, so a 264-byte file stays 264 bytes and stays usable in MAME.
- rtl/pgm2_card.sv:10 The SLE 4442 rules as MAME has them: data, protection and security bytes change only after a successful password check; data bytes 0x00..0x1f also need their protection bit; a protection byte can only lose bits; a wrong password halves the
- rtl/pgm2_card.sv:39 op_slot's security bytes {3, 2, 1}; ff when not authenticated (MAME)
- rtl/pgm2_core.sv:339 A YMZ774 status read waits until the CPU's earlier writes have reached the chip and its logic is up to the current tick, as MAME's read sees them after its stream update: the games select 0xe3 / 0xe4 and read right after a key-on, and an an
- rtl/pgm2_core.sv:383 the 774's data port is its odd byte (MAME: an 8-bit device on the 32-bit bus, read(offset & 1)): the games read the status with LDRB 0x40000001 (mask 0000ff00); lanes 0 / 2 (the address port) read 0
- rtl/pgm2_ddrcol.sv:2 The MRA's index-1 element puts the files of MAME's ROM_LOAD32_WORD pairs into the DDR3 as they are: bank k's 'l' file at `lbase[k]` and its 'h' file at `hbase[k]` (64-bit word addresses), `fsize[k]` bytes each (0: no bank).
- rtl/pgm2_ddrcol.sv:3 Bank 0 is the colour space from byte 0, bank 1 from byte 0x10000000 (kof98umh's spa2 / spb2); in each bank the files fill at most 128 MB of interleaved words and MAME's region is zero after that, so a byte address with bit 27 set, or past t
- rtl/pgm2_ddrcol.sv:6 The colour ROM's 32-bit word w of a bank is {h halfword w, l halfword w}, and every halfword gets the sprite colour decode of MAME's driver init (pgm2.cpp sprite_colour_decode: bits 10:8 <-> 5:3), which pgm2_loader does when it writes the S
- rtl/pgm2_fg.sv:3 Reference: mister/tools/pgm2_ref.py `compose` (FG block), MAME pgm2_v.cpp.
- rtl/pgm2_igs037.sv:11 Frame pipeline (MAME): the sprite list is rasterised at vblank into the draw bitmap and shown one frame later; tile maps, scroll and palettes are read live.
- rtl/pgm2_igs037.sv:14 ROM ports (all request/ready + valid beats, one request outstanding per port): bg_* : bgtile, little-endian 32-bit words, burst of 8 (a 32-byte tile row) fg_* : tiles (text), little-endian 32-bit words, burst of 1 (a 4-byte tile row) mk_* :
- rtl/pgm2_igs037.sv:114 sprite mask key: MAME sprite_encryption_w stores bitswap<32>(key ^ 0x90055555) when the game writes it
- rtl/pgm2_igs037.sv:253 ------------------------------------------------------------------ sprite engine + double bitmap MAME rasterises the sprite list at the vblank edge instantaneously (after clearing the bitmap) and raises the vblank interrupt only afterwards;
- rtl/pgm2_kov3mod.sv:1 kov3 program-ROM module: the ROM board's "HW1" chip with the IG-L flash, after MAME 0.289 pgm2.cpp module_* / pio_*.
- rtl/pgm2_kov3mod.sv:3 The game talks to it in two ways (traced in MAME with tools/lua/pgm2_module_tap.lua, kov3 frame 4): * a serial port bit-banged on the IGS036's PIO: output bit 8 = data to the module, bit 9 = clock (SODR 0xfffff430 sets, CODR 0xfffff434 clea
- rtl/pgm2_kov3mod.sv:9 * 16-bit writes into the ROM area 0x10000000..0x107fffff: the value dec_val (key bits 21:6) switches the descrambling of the ROM (MAME: decrypt_kov3_module, i.e. halfword i reads raw halfword i ^ addr_xor, XOR data_xor; doing it twice undoe
- rtl/pgm2_kov3mod.sv:50 MAME handles the two halves of a 32-bit write in turn: each dec_val toggles, each 0x00c2 starts the checksum mode
- rtl/pgm2_kov3mod.sv:73 MAME module_clk_cnt: 0..79 receive, 80..151 send
- rtl/pgm2_kov3mod.sv:80 MAME updates the data latch before it looks at the clock
- rtl/pgm2_kov3mod.sv:113 MAME: "needed because of a false clock pulse during gpio init"
- rtl/pgm2_kov3mod.sv:124 the answer (an unknown command keeps the previous one, whose sum byte MAME recomputes to the same)
- rtl/pgm2_loader.sv:2 The MRA is a plain concatenation of the MAME zip's files behind small headers; the word interleave of MAME's ROM_LOAD32_WORD and the sprite ROM decode that MAME does at driver init (pgm2.cpp iga_u12_decode / iga_u16_decode / sprite_colour_d
- rtl/pgm2_loader.sv:6 Stream (multi-byte fields big endian): byte 0 flags: bit 0 = ROM board with 2 MB of RAM at the bottom of the program window (ddpdojt) bit 1 = the sprite colour ROM is not in this stream: the MRA's index 1 puts it into the DDR3 (ko
- rtl/pgm2_loader.sv:19 id 5 / 13 sprite colour ROM, file 'l' / 'h' (decoded: bits 10:8 <-> 5:3 of each 16-bit word) each pair is one region of twice the file size; 'l' must come first and allocates it id 7 YMZ774 samples -> HPS DDR3, where the fa
- rtl/pgm2_spr.sv:6 MAME only draws if a terminator (word2 bit 31) exists; the engine first scans for it, then draws entries 0 ..
- rtl/pgm2_vtiming.sv:3 Visible area follows the IGS037 resolution register (MAME pgm2_v.cpp): 0 = 320x240, 1 = 448x224, 2 = 512x240.
- rtl/pgm2_vtiming.sv:4 MAME models 264 lines per frame in every mode.
- rtl/pgm2_vtiming.sv:4 The pixel clock and blanking per mode are NOT known (MAME only models refresh rate and visible area), so the horizontal totals are parameters and `ce` is supplied from outside.
- rtl/pgm2_ymzrom.sv:6 The image keeps the FILE's byte order (file byte k is byte lane k[2:0] of beat base + k[..:3]), while MAME loads the file with ROM_LOAD16_WORD_SWAP: the chip's word w is {file[4w+1], file[4w], file[4w+3], file[4w+2]} (tools/pgm2_rom.py's ym
- rtl/pgm2_ymzrom.sv:68 the chip's word from half h of a beat of file bytes: MAME's region is the file with each 16-bit word byte-swapped, and the chip reads it big endian, so the word is {file 4h+1, file 4h, file 4h+3, file 4h+2}
- rtl/ymz774.sv:6 Everything MAME does per output sample (sequencer, volume ramp, voice boundary handling, mixing) is done by one sequential FSM per tick ("chip logic").
- rtl/ymz774.sv:38 MAME's read sees after its stream update (a status read waits for it)
- rtl/ymz774.sv:172 ------------------------------------------------------------------ CPU write FIFO Every write carries the number of ticks seen before it (wtk): the chip logic applies it just before it processes that tick, as MAME applies it before that sam
- rtl/ymz774.sv:321 register write (MAME ymz774_device::write / reg_write); `b` is the register bank in effect
- rtl/ymz774.sv:623 ---- volume ramp (first part of MAME's sequencer())
- rtl/ymz_bus.sv:1 CPU bus side of the YMZ774: a 32 bit store to 0x40000000 is split into byte lanes in ascending order (lane 0 and 2 = register select, lane 1 and 3 = data), like MAME's 8 bit device on a 32 bit bus.
- rtl/ymz_dec.sv:5 Behaviour = mister/tools/ymz_ref.py Amm.decode_buffer (MAME mpeg_audio.cpp) with the integer dequantiser of ymz_fixed.IntDeqAmm (x(Q.20) = ((q - 2^(bits-1) + m) * GQ[idx][scf] + 2^15) >> 16).
- rtl/ymz_dec.sv:15 cmd_clear voice forget the synthesis history of the voice (MAME decoder->clear()).
- rtl/ymz_dec.sv:19 A band allocation value of -1 in MAME's tables (never produced by real streams) is read as 0.
- rtl/ymz_synth.sv:3 Fixed-point version of mpeg_audio::decode_mpeg2's inner loop (mister/tools/ymz_ref.py), bit-exact with mister/tools/ymz_fixed.py (data Q.20, cosine / window Q.16): max error against MAME's double-precision output is 1 LSB.
- rtl/ymz_synth.sv:8 State per ring (ring = voice * 2 + channel): the MPEG "V" history as a ring of 16 granules (512 entries; MAME's 1024-entry buffer with the memmove is equivalent), a slot pointer and an age (granules since clear, saturating): entries older t
- rtl/ymz_synth.sv:13 `clr` forgets a ring's history (MAME decoder->clear()).
- README.md:4 Written from MAME 0.289's `pgm2` driver; MAME was the oracle for everything (the CPU's view of the machine, the video chip's memories, the sound chip's samples,
- README.md:6 It runs all five games MAME runs, in all 21 versions MAME 0.289 knows.
- README.md:11 The five games' title screens, as MAME 0.289 draws them (to show what kind of games these are).
- README.md:63 Not included: Bu Bu Car, which MAME 0.289 does not run either (not fully dumped / decrypted).
- README.md:76 A card works in MAME too, and MAME's cards work in the core.
- README.md:105 In simulation (Verilator, the games' real programs, the real memory path): the video chip renders MAME's states pixel for pixel (hundreds of frames of every gam
- README.md:120 Knights of Valour 3 V101: MAME marks its program ROM as a bad dump and runs it with made-up module values; the core uses the same values.
- README.md:122 The board's calendar starts from 0 at every load, as in MAME.
- README.md:126 The IGS037 has a 32 x 32 tile background with line scroll, an 8 x 8 tile text layer and a sprite engine that draws the sprite list into a bitmap at vblank, show
- README.md:132 Sound: the YMZ774 decodes the games' MPEG-like AMM sample streams in hardware (`rtl/ymz_dec.sv`) for 16 voices with its sequencers, volume and pan, mixed to 44.
- README.md:156 | `tools/bench_video.py` (`sim/tb_igs037.cpp`) | the video chip on MAME's frozen states, pixels compared with MAME's |
- README.md:160 | `tools/bench_ymz774.py` (`sim/tb_ymz774.cpp`) | the sound chip on MAME's register writes, against the integer model, under DDR3 latency |
- README.md:161 | `tools/boot_check.py` | every set booted in the whole-board bench and compared with MAME's power-on frames |
- README.md:178 | `docs/` | `hardware.md` (the board as MAME models it), `video_rtl.md`, `sound_notes.md`, `cpu_notes.md`, `mister_top.md` (the top level, memory map, verificat
- README.md:183 **MAME** (the `pgm2` driver by David Haywood, Xing Xing and Andreas Naive; the YMZ770 / YMZ774 by Olivier Galibert, R. Belmont and MetalliC; BSD-3-Clause): the
- README.md:184 The sound chip's tables and decoder follow MAME's.
- README.md:195 The `ymz_*.mem` tables and the sound decoder derive from MAME (BSD-3-Clause); vendored modules keep their own licences.
MAMEと一致する、MAMEに合わせた、またはMAMEで確認したと記載 — 5
- rtl/pgm2_igs037.sv:3 Verified against mister/tools/pgm2_ref.py (a pixel-exact model of MAME 0.289's pgm2 video) by sim/tb_igs037.cpp.
- rtl/pgm2_spr.sv:3 A hardware translation of mister/tools/pgm2_ref.py `draw_sprites` (itself a port of MAME pgm2_v.cpp draw_sprites; verified pixel-exact against MAME 0.289).
- rtl/ymz774.sv:2 Behaviour = mister/tools/ymz_ref.py Ymz774 (bit-exact with MAME's ymz770.cpp output for the five games checked).
- rtl/ymz774.sv:13 That delay (64 ticks = 1.45 ms) hides the frame-decode latency, so the result is identical to MAME's instantaneous decoder (apart from the output delay).
- README.md:105 **Verification.** MAME 0.289 is the reference.
MAMEから移植・書き写した、または取り入れたと記載 — 4
- PGM2.sv:218 MAME's SW1 (bit 0 = SW1:1) as byte 0 of ioctl index 254; a 1 is MAME's default setting (all ones).
- rtl/igs036_aic.sv:2 Port of MAME 0.289 src/devices/machine/atmel_arm_aic.cpp (BSD-3-Clause, copyright-holders Ryan Holtz / David Haywood), via the C++ model in mister/sim/tb_soc.cpp that reproduces MAME's boot and game flow.
- rtl/igs036_decrypt.sv:2 Port of MAME 0.289 src/mame/igs/igs036crypt.cpp (BSD-3-Clause, copyright-holders Andreas Naive, David Haywood) via mister/sim/igs036_crypt.h. Pure function of the word address and of the key byte key[word_address & 0xff] (the 256 byte table
- rtl/pgm2_spr.sv:3 A hardware translation of mister/tools/pgm2_ref.py `draw_sprites` (itself a port of MAME pgm2_v.cpp draw_sprites; verified pixel-exact against MAME 0.289).
MAMEの近似をそのまま採用 — 1
- README.md:118 DoDonPachi Dai-Ou-Jou Tamashii's busiest scenes need nearly a whole frame of the core's 40 MHz CPU (the real IGS036's clock is unknown; MAME's 100 MHz is a gues
MAMEドライバと同じ文言を含む(出典の明記なし) — 1