Videocart dumper
From veswiki
Sean Riddle built a dumper for the Videocarts to be able to lure the code out without damaging the cartridges. A portable version was shipped over the world to collect rare data from even rarer cartridges.
This page is a work in progress, for now I only present the Pic BASIC Pro code I modified from Sean's original 20MHz PIC16F84 version - as I only had a PIC16C84 at home...
Will complete this with hardware information and compiled code as well.
; Fairchild Channel F cart dumper version 2
; 2/10/2004 Sean Riddle seanriddle@cox.net
; Edited from 16f84 to 16c84 by Fredric Blåholtz 03/08/2009
; Pic BASIC Pro
; 1/5 speed, the nop:s are half as many.
INCLUDE "modedefs.bas"
@ device pic16c84, hs_osc, wdt_off
DEFINE OSC 4 ;4 MHz oscillator
DEFINE NO_CLRWDT 1 ;watchdog is off
DEFINE DEBUG_REG PORTA ;serial output on A.0
DEFINE DEBUG_BIT 0
DEFINE DEBUG_BAUD 9600
' Set Debug mode: 0 = true, 1 = inverted
DEFINE DEBUG_MODE 1
k VAR WORD ;another
rom VAR BYTE ;buffer to store ROM
f8phi VAR PORTA.1 ;clock signal
f8write VAR PORTA.2 ;write signal
f8romc3 VAR PORTA.3 ;ROMC3 signal
; CMCON=7 ;turn off comparators
OPTION_REG.7=0 ;weak pull ups on port B
TRISB=$FF ;port B is all input
Low f8phi
Low f8write
Low f8romc3
Debug "Dumping starts in two seconds..."
Pause 2000 ;wait 2 seconds after reset
; what I do:
; clear PC0 with ROMC state 8
; loop 16384 times
; fetch 4 bytes into buffer with ROMC state 0
; dump buffer to serial port
; clear PC0
f8phi=1
f8write=1
f8phi=0
@ nop
f8phi=1
f8write=0
f8phi=0
f8romc3=1
;ROMC state 8, clear PC0.
f8phi=1
@ nop
f8phi=0
@ nop
f8phi=1
@ nop
f8phi=0
@ nop
f8phi=1
@ nop
f8phi=0
f8romc3=0
For k=0 TO 16383
f8phi=1
f8write=1
f8phi=0
@ nop
f8phi=1
f8write=0
f8phi=0
@ nop
f8phi=1
;ROMC state 0, fetch instruction
@ nop
f8phi=0
@ nop
f8phi=1
@ nop
f8phi=0
@ nop
f8phi=1
rom=PORTB ;read databus into buffer
f8phi=0
Debug rom
Next k
End