Author of Nuked emulators(OPL3, OPN2, SC-55), NBlood/Rednukem and whatnot.
Interested in reverse engineering (old games & integrated circuits) and emulation
dumped SC-55mkII's secondary MCU (Mitsubishi m37409m2) firmware using voltage glitching. Injecting trojan to its ram and using glitch to corrupt PC counter to execute it did the trick
@RCAVictorCo
Yup, that's correct. A few MD games incorrectly read busy flag from illegal ports and thus reading whatever was on read bus. On YM2612 that value would decay relatively quickly and thus not super critical, but on YM3438 value will stay for 10-30 seconds, causing major freezes
@giuliozausa
It's some kind of DPCM, each byte is signed 8 bit step value plus every 16 bytes share same 4 bit step shift value stored in the beginning of ROM
@furrtek
interesting, looks like they used same CMOS cell library as in Mega Drive bus arbiter (YM6045B/C) and IO chip (YM6046). We studied its cells a bit here
@giuliozausa
If you can write data to its RAM then yeah, it is quite possible. Or if part of code is in external ROM (like with SC-55mkII's main MCU) it is possible to inject trojan in ROM chip instead
@RCAVictorCo
Teradrive was first MD system to use YM3438, and at the very end of its development sega noticed this issue and literally patched PCBs to fix by cutting traces to A0/A1 and adding AND gates between them and RD signal. Later they asked Yamaha to make this change in FC1004 asic
@RCAVictorCo
yes, sound chips and mega drive vdp (huge cmos chip) look like hand made. MD bus arbiter/IO chips (both standalone (2 layers m) and integrated (1 layer m)) are auto-traced and look like mess and quite inefficient.
example:
@leo__oliveira
@plutiedev
@birt_shannon
I have schematic from its integration into FC1004 asic. It uses BGACK/WAIT to detect DMA start and add extra refresh pulse and switches OE0 to CAS0. Have no idea what does latter, OE0 and CAS0 are same during DMA. Maybe something at the end of dma, dunno
@1Cy001
it fills ram with nop and writes dumper code. dumper flags specific byte to tell that hack worked and just copies 128 bytes from specified address to dual port ram, which I then read back
@leo__oliveira
@RCAVictorCo
@v9938
@goripon_tw
also it adds some bullshit circuit to make bus arbiter broken in PAL mode lol (TPAL pin). It was never used in consoles with discrete YM6045C (always tied to 5v) afaik, but was later used in integrated bus arbiter in FC1004 to prevent VA7 consoles selling in PAL regions lol
@travisgoodspeed
Thanks
I used the latter approach, this MCU uses modified 6502 as its core and only have 8kb of address space, thus chances hitting needed RAM space was pretty high
@Dave_Maynor
Disabling power of the chip will cause PC register corrupt to randomish value. Since this is really simple 8 bit MCU with very small memory footprint (only 8kb), there's very high chances to point PC to ram address and execute it after lots of retries
@travisgoodspeed
@RCAVictorCo
Is there high res version of die photos? Would love to finally implement YM2413 mode correctly in my VRC7 schematics and software emulator. I had to approximate some bits that were removed in VRC7. Thanks
@RCAVictorCo
duty cycle of output is only 25%. So 75% of times it outputs the "fixed" value biased toward sign value. Also if you mute channel, it will output fixed value all the time, but you'll still hear some sound coming out of it (e.g. EWJ2 moonlight sonata)
@icculus
Heh, doom uses similar trick to pack texture coordinates into one variable. Build engine was doing something similar in its asm routines, but it was packing 4 variables in 3 cpu registers IIRC
@RCAVictorCo
well, "fixed". Because matrix resistance is not infinite it will cause some offset. This error then gets accummulated and cause infamous "ladder effect"
@Grauw
@ym2413
Interesting, looks like it using test bits 2 and 0. Bit 2 resets phase accumulator on each iteration and thus phase gen. unit effectively outputs phase increment value which could be controlled using r
#16
. Bit 0 forces env. gen to output zero attenuation value (e.g max volume)
@RCAVictorCo
@travisgoodspeed
doing from scratch is more fun :D, my current workflow is label cell in inkscape and directly write C code. we can then double check our results
though I don't have source images
@TheOpenRift
seems it uses completely different approach than my effort. i.e. it tries to interpret instrument defiinitions from rom chips, but otherwise it is completely custom code (similar to Munt). My approach is similar to MAME, i.e. emulate CPUs and PCM chip and run SC-55 firmware as is
@furrtek
@turboxray
@Stanislav_Prh
calculations I used for nuked-md. I've measured resistance between GND and VCC pins of VDP and then calculated overall resistance to GND and VCC for each level. Results is pretty close to what others measured using scope
@1Cy001
part of internal ram is dual port and can be accessed by external device. I put custom code there. I used this ram for dumping as well, copying firmware piece by piece (this type of ram is 192 bytes only, firmware itself is 4096 bytes)
@mikepavone
@DustinOfcYT
FYI. This was 'fixed' only in ASIC YM3438 variant. Like YM2612 both discrete YM3438 and later YMF276 output correct status only when A0 and A1 pin states are zero. Thus these games have issues with YM3438 modded MD1.