Hi, all,
OK, I don't know if everyone enjoys reading these long posts.
Please let me know if I should try to cut them down a bit / get to the point (honestly, I really don't mind) :cool-new:...
I had HUGE problems with SD cards for many hours yesterday, and I think I might have damaged one or two cards due to a silly mistakes.
It looks like probably damaged my SD readers too, so I just bought a new internal reader, I hope it works better than the last two.
I thought I'd try and save myself a bit of time by using an SD slot from an old DVD player. NOT a good idea!
I'd used the exact same type of slot fine in another project, so I thought it would be OK.
Basically, I'd forgotten that it has resistors on the SD board so it can work with 5V signals, not 3.3V that the DC serial port uses!!
In the end, I just had to pray that my three or four micro-SD cards would work and I just soldered the wires directly to my remaining micro-to-SD adapter. :encouragement:
In the mean time, I "borrowed" my Dad's SD reader and got DS and everything booting OK.
I also had to get PIO transfers working on the FPGA so that I could try the standard "gdrip" app on Dreamshell to help debug the FPGA.
The only reason I needed to add PIO support was because the standard cdrom functions in KOS (which "gdrip" uses) only support PIO.
(Every real GD disk I've seen uses DMA for all sector transfers, not PIO).
So, it I can't yet directly test the normal DMA loading, but I need to see what the hell the DC is actually reading from the FPGA.
OK, next problem. The "gdrip" included with DS does now appear to be reading the sectors via the FPGA (I can even watch the data fly across on the PC and it looks OK), but it just says this...
"Please wait, checking to disc..."
"Reading IP.BIN ..."
"You inserted not a GD-ROM disc!"
At least it shows that the data I'm sending is NOT correct for some reason?
But I now need a way of displaying that data on-screen, so I tried compiling my own command for DS...
I've installed DC DEV R4 and all it's own examples compile fine (under Cygwin).
I gave up on trying to get things to compile under Code::Blocks. It still complains about linker stuff missing?
So, I nicked some code from the dreamrip201 source and I'm trying to get it to compile as a DS command...
http://pastebin.com/uA3rWb1v
All I'm really interested in is getting it to print the hex as ASCII on-screen....
for (i=0; i<32; i++) {
ds_printf(" %01X", secbuf+i);
}
The problem is, I don't think you can compile raw code (with standard "printf" etc.) and run it under DS...
You need the handle the DS command structure and add the DS includes etc.
I got the basic KOS example to compile, but it won't work under DS for the above reasons (just hangs the DC).
Right, NEXT problem - The Dreamshell SDK examples don't seem to compile under the toolchain included with DC DEV R4?
There are tons of files missing, like these...
../../../include/ds.h:61:23: kos/rwsem.h: No such file or directory
../../../include/ds.h:62:32: kos/recursive_lock.h: No such file or directory
../../../include/ds.h:63:22: kos/once.h: No such file or directory
../../../include/ds.h:64:21: kos/tls.h: No such file or directory
So I'm stumped once again!
Does anyone know if the DS RC1 SDK files can compile with DC DEV R4?
Is it necessary to wipe out my nice working Cygwin, then install gcc again from the DC SWAT download page?
I've just registered at DC SWAT. I'll paste some of the this post there later on.
Cheers,
OzOnE.
btw, I learnt some more about the DC syscalls yesterday. What's good is that the dreamrip source appears to talk directly to the GD_ROM syscall!...
\\ 0x8c0000bc is the original BIOS GD_ROM syscall location!...
#define MAKE_SYSCALL(rs, p1, p2, idx) \
uint32 *syscall_bc = (uint32*)0x8c0000bc; \
int (*syscall)() = (int (*)())(*syscall_bc); \
rs syscall((p1), (p2), 0, (idx));