Clawgrip sent me an HD6301Y0 from a chess computer several years ago, and Crazyc sent me another from a Yamaha PSR11 a few years later. I had dumped the ROMs from 6801s using test mode 0 documented in the datasheet that allows access to internal ROM and fetches the reset vector externally. But the 6301Y0 datasheet doesn't list that mode, just mode 3 without any external busses, mode 1 that cannot access internal ROM, and mode 2 that can, but does not fetch the reset vector from external memory. First I experimented with adding an EPROM to the 6301Y0. I thought it would be easier than adding an EPROM to the 6801 since there are more pins and the low address lines are not multiplexed with the data bus. But in mode 2, port 4 (where the high address lines are) is made all input during reset. I decided to just use the lower 8 address lines and enable the EPROM output on /RD. To avoid data bus contention, I connected the EPROM's data outputs to the data bus with resistors. Since I only had 256 bytes, I used a 2716 EPROM, and tied A8-A10 and chip select low. EPROM contents: $00-$7F, $A1-$FF - all $80 $80:8E 80 40 LDS #8040 stack at $8040 ($40 in the EPROM) $83:4F CLRA $84:97 17 STA $17 port 6 = 0 $86:97 03 STA $03 port 2 = 0 $88:4A DECA $89:97 16 STA $16 port 6 DDR = FF, all out $8B:C6 01 LDB #$01 $8D:D7 01 STB $01 port 2 DDR = 01, 2.0 out $8F:CE C0 00 LDX #$C000 start dump at $C000 $92:A6 00 LDA (X+#$00) get byte from ROM $94:97 17 STA $17 put ROM data on port 6 $96:D7 03 STB $03 set flag $98:4F CLRA $99:97 03 STA $03 clear flag $9B:08 INX next byte $9C:26 F4 BNE $92 until wrap to $0000 $9E:7E 80 80 JMP $8080 then start over In mode 1 the reset vector is fetched from the last 2 bytes of the EPROM (which contain #$8080), but the internal ROM is inaccessible. In mode 2 the internal ROM is enabled, but we have to trick the microcontroller to jump to the code in the external ROM. The datasheet mentions that the stack pointer is not initialized on reset, and to make sure to set it early in the reset routine before an NMI can occur. This made me want to try the NMI attack Sergio G. executed on TLCS90: https://github.com/sergiopolog/tlcs90-rom-reader The idea is to boot into external ROM, set the stack pointer to an external address, reset the chip and select internal ROM mode, then quickly hit NMI before the reset routine can change the stack pointer. When the NMI routine returns, or, if it calls a subroutine, when the subroutine returns, the return address will be fetched from an external address. Funny enough, the datasheet for HD6301V1 (which has test mode 0 designed for ROM dumping) mentions that it disables (the now mis-named) NMI after reset until the stack pointer is set. But 6301Y0 does not. I connected a PIC microcontroller to the 6301Y0's EXTAL, MP0, MP1, /RES, /STBY, /NMI pins, and a Saleae Logic 16 to Port 6, Port 2.0, E, /RD, /WR, R/W, /LIR and BA. A simple program on the PIC could control the 6301Y0 while I captured signals with the Logic. To simplify things, I set the stackpointer to the middle of 128 $80s at the top of the EPROM. With the stack there, data pushed is lost, and when it is popped back off, $80 is returned. I put the ROM dumping code at $80 in the EPROM since $8080 would be popped off the stack as the return address. $8080 is in the external address space and every 256 bytes has a copy of the EPROM. This did not work on either chip. Once I had dumped the Yamaha chip I could see why- the NMI vector pointed to the reset routine, so the stack pointer got changed anyway. I'm not certain why it didn't work on the chess computer chip; maybe with more experimentation I would have found timing that worked. At this point I carefully read two different datasheets looking for any hints. I noticed that the register space is $00-$27, but the last 6 registers are reserved. Maybe writing something to one of those could do something useful. And register $1F is named Test Register. A note says "Register for test. Don't access this register." Sounds interesting! I also read "Reset must be kept low for at least 20ms when the power starts up." (Also when canceling standby mode with reset.) "In standby mode, the mode program pins MP0 and MP1 should be held according to the operating mode." "Always use the reset start when returning from the standby mode." There is an EPROM version of 6301Y0 called 63701Y0. It has an additional programming and verification mode. It's a long shot, but maybe the 6301Y0 data can be read in this mode. Maybe with low enough resistors on the EPROM, the reset vector from the internal ROM could be overridden? This might damage the drivers, though. In addition, clock or power glitches might make the chip jump to an incorrect address. That could allow the dumping code to be executed in mode 2. I experimented with these ideas without luck, and finally decided to try clock glitching, a tried-and-true method. After trying several things I hit on this method: Set mode 0, /reset=0. Start 1MHz clock to EXTAL for 1/10 second. /reset=1. Change mode to mode 2. Stop EXTAL clock for 2 microseconds. /reset=0. /reset=1. Wait 65 microseconds. restart EXTAL clock After a few seconds, the code in the external EPROM will execute, dumping the internal ROM over and over. I've included a PICBASIC PRO program for PIC18F46K22 named dump6301y0.pbp, and the compiled dump6301y0.hex. The program clocks the 6301Y0 using PWM, sets up INT0 to look for the flag from the 6301Y0, then outputs the ROM data via serial at 250,000 bps. The PIC only needs a 1K resistor on the TX line to work with normal RS232, but if you want to use a TTL-to-USB serial adapter instead, tie pin B.1 low. Tie pin B.2 low to lower the bps to 115,200. At 250K bps a 16K dump takes about 4 seconds, and at 115,200 it takes about 8 seconds. While experimenting, I drove EXTAL, MP0, MP1, /RES, /STBY, and /NMI, but the only required signals to dump the ROM are EXTAL, MP1, and /RES. MP0 can be tied low, and /STBY and /NMI can be tied high. /HALT needs to be tied high. I also tied /IRQ1 and /IRQ2 high, although they will be masked on reset. I tied MR high. UPDATE: I bought an HD6301X0 off ebay and attempted to dump it the same way, but it did not work. I experimented and found that toggling VCC at a certain point would glitch it into dumping. After more experimenting, I found a method that works for both X0 and Y0, so I updated the PBP source and the compiled HEX files. X0 would only dump at the slower speed, so I removed the B.2 jumper and it now only dumps at 115,200 bps. UPDATE 2: Berger built the circuit and was able to dump some HD6301Y0 chips (including one in the flatpack package), but not X0. So I added an alternate method that is selected by pulling PIC B.2 low with a 1K resistor. Also, I enabled the PIC watchdog to reset if the 6301 hasn't started dumping after 4 seconds. We also discovered that the EPROM's /OE needs to be tied low, not driven by the 6301's /RD signal. Thanks to him for the nice schematic!