Piratero said:I had a little bit of time today. So I committed in the first example. It's a test that goes through all SCU DMA levels as well as interrupts.
Unfortunately it's not working at the moment. It seems to hang. If you guys want to take a look at it, be my guest!![]()
ExCyber said:I'm pretty sure I did see some stuff about SCU DMA restrictions in one of the TBs, but it's been a long time.
while (true) {
vblank_in_wait();
vblank_out_wait();
/* Write to VRAM, graphics, update scroll screen, etc. */
}
/*
* If we don't wait for VBLANK-IN, we might be in a case for
* when we first enter the infinite loop during VBLANK-IN (retrace).
*
* Halfway through the loop, we switch over to VBLANK-OUT (scan)
* causing shearing.
*/
while ((TVSTAT & 0x0008)); /* Spin until we get to VBLANK-OUT (scan) */
while (true) {
while ((TVSTAT & 0x0008) == 0); /* spin until we get to VBLANK-IN (retrace) */
/* Write to VRAM, graphics, update scroll screen, etc. */
}
antime said:Vblank in means start of vblank (as in "entering vblank period").
You could try using SCU timer 0. The timer 0 counter is reset at vblank out, and counts hblank in events. Setting the interrupt to a number of scanlines after vblank in should give you the needed timing. A scanline takes 64õs on PAL and 63.5õs on NTSC, so vertical resolution + 5 should be enough for the SMPC 300õs delay.
Chilly Willy said:My ARP+ doesn't have the connector, so I need CDROM support.![]()
I've got a mod chip in my Saturn, so I planned on using emulators and CDRs to testing and running stuff.
I just updated my clone of libyaul, so I'll try the cross-compiler for you and let you know how it goes, and any changes I need to make (if any). I could probably also help with the CD filesystem.
Chilly Willy said:I've mostly used logging or setting the background color in my debugging, especially on consoles. I really ought to do a gdb stub for KRIKzz's USB link for the MD/32X. I've got a couple of those - plug into the controller port and have a USB port to go to the computer.
I've been looking over the build scripts and such. Looks good so far. I'm going to download the archives and give it a try.
# 'yes': Already downloaded
# 'no': Download packages for building the compiler
BUILD_DOWNLOAD="no"
NEWLIB_VERSION="1.20.0"
Chilly Willy said:Well, a few things with the tools build script...
Code:# 'yes': Already downloaded # 'no': Download packages for building the compiler BUILD_DOWNLOAD="no"
Your explanation is backwards. Yes means download, and no means already downloaded.
Code:NEWLIB_VERSION="1.20.0"
You had 1.20, not 1.20.0, which causes a failure at patch time.![]()
Other than those two minor issues, the build_compiler script worked just peachy.
jlfenton@SBC:~/Projects/Saturn/libyaul/build$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../SegaSaturn-compiler-SH7604.cmake
CMake Error: File /home/jlfenton/Projects/Saturn/libyaul/config.h.cmake does not exist.
CMake Error at CMakeLists.txt:5 (CONFIGURE_FILE):
configure_file Problem configuring file
Chilly Willy said:The usb link device is for the Genesis, not the Saturn, although it would probably work with the Saturn with an appropriate MD to Saturn adapter. It's a tiny board that plugs into the Genesis controller port; it has a USB serial chip on it, and an AVR MPU. The AVR receives data from the Genesis and sends it as serial to the PC over the USB chip, and receives data from the PC via USB serial which it then allows the Genesis to read. The controller uses TH/TR/TL for handshaking, and sends nibbles over the direction lines.
http://krikzz.com/link-unit.html