|
Post by socram8888 on Jul 18, 2010 6:52:36 GMT -5
I'm working on a "custom LAKABAJO" using World Cup Italia '90, a very cheap and easy to get cartridge
I already have the Genesis-side GameGenie codes, and they work (at least on Gens KMod)
I'm using the same cable as the LAKABAJO, with the following PC-side program:
dim shared baseaddr as uinteger dim count as uinteger dim curbyte as ubyte
const START_ADDR = &hFFFF4C const END_ADDR = &hFFFFFF
function readStatus() as ubyte return inp(baseaddr + 1) and &hF8 end function
function send(dat as ubyte) as ubyte out baseaddr, (dat xor &hFF) end function
baseaddr = 888
send(&H80)
while not bit(readStatus(), 5) ' WAIT FOR WORLD CUP ITALIA STARTUP (GameGenie puts bit 5 low) sleep 1 wend
open "test.bin" for binary access read as #1
while not bit(readStatus(), 6) ' bypass first read wend while bit(readStatus(), 6) wend
count = 1 while count <= END_ADDR - START_ADDR print count get #1, , curbyte send(curbyte) while not bit(readStatus(), 6) ' Wait until SEL goes low wend while bit(readStatus(), 6) ' Wait until SEL goes high wend count += 1 wend
print "Finished!" sleep
It's BASIC (well, not BASIC, but FreeBASIC), so I think it's pretty easy to understood. Ask if you found anything that you don't understood
The problem is that I'm getting 90 "reads", but it should read 180 (exactly the double)
Anyone knows where the problem is?
Thank you in advance
EDIT: I already fixed it. I were using bit 6 as SELECT line, when the SELECT line is actually bit 5 ;D
|
|
|
Post by Tiido on Jul 19, 2010 2:03:12 GMT -5
no idea... Try FOR i% = 0 to END_ADDR - START_ADDR ..... NEXT i% perhaps it makes a difference...? EDIT: did not notice the EDIT
|
|
|
Post by socram8888 on Jul 21, 2010 10:36:46 GMT -5
I still don't work Anyway, I'm bidding for a faulty MegaCD model 1 for 24$ shipping fees included . I think it should be easy to fix the jammed tray...
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jul 21, 2010 12:15:09 GMT -5
Doesn't the original LAKABAJO work? You need to use C language to write the host program because it is VERY timing sensitive. Or I can try to include this game into my host program. I only do this if there are enough Game Genie codes . There must be a Game Genie code to modify the horizontal interrupt vector, or else the World Cup game is useless
|
|
|
Post by Tiido on Jul 21, 2010 16:34:24 GMT -5
FreeBASIC is more or less as fast as C is from what I've been told.
|
|
|
Post by TheMVRules on Jul 22, 2010 9:39:01 GMT -5
It isn't so very fast on my computer, at least.
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jul 22, 2010 14:47:58 GMT -5
I dunno about Freebasic - I've only heard about it. Just try a very short experiment in C. I'm just assuming that C (Visual C++, MINGW, Linux, etc) is a more programmer controlled environment compared to Freebasic For this LAKABAJO application, your host code needs to be very fast
|
|
|
Post by Syniphas on Jul 22, 2010 20:08:57 GMT -5
FreeBASIC is as fast as C, because, contrary to popular belief, it's compiled and not interpreted (like the original BASIC language, in the 60's)
Although, I have no idea how the LAKABAJO works, so I can't help you :/
|
|
|
Post by Tom Maneiro on Jul 22, 2010 20:30:42 GMT -5
Why not screw the whole high-level thing and do coding in assembly? Or play with those evil compiler optimizer flags - fun fun
|
|
|
Post by TheMVRules on Jul 24, 2010 3:15:03 GMT -5
Yeah, assembly!
|
|
|
Post by Tiido on Jul 25, 2010 8:17:32 GMT -5
I love how you can do inline ASM in FB
|
|