I got my DTC-27 driver today and it fits perfectly, thanks for the tip e5Frog. The DLH3-95 on the first page is a *very* tight fit for the two deep screws, so the DTC-27 is definitely the driver you want.
The examples given above work correctly in Mednafen, Reality Boy, and on hardware.
> What should I do?
It’s likely you will need to restructure or rewrite your main loop.
> If you don’t want to use interrupts, you
> could sync to the actual screen refresh
> by using the DPSTTS [DPBSY flags]…
The reason for syncing to XPEND or using the XPEND interrupt is to avoid writing to VRAM, the world attributes, OAM, the parameter tables, etc, during the VIP drawing process. Syncing to GAMESTART is fine too, but means you need to use an interrupt:
#include "libgccvb.h"
void vip_isr()
{
VIP_REGS[INTENB]= 0;
if(VIP_REGS[INTPND] & XPEND)
{
VIP_REGS[INTCLR]= XPEND;
// drawing finished, write to VRAM, OAM, etc, here!
}
VIP_REGS[INTENB]= XPEND;
}
int main()
{
int count= 0;
VPU_VECTOR= (u32)vip_isr;
VIP_REGS[INTENB]= XPEND;
vbDisplayOn();
vbDisplayShow();
// main loop @ 50 Hz
while(1)
{
// sync with start of gameframe
while(!(VIP_REGS[INTPND] & GAMESTART));
// clear flag
VIP_REGS[INTCLR]= GAMESTART;
// read controller
// do stuff
if((count&15)==0)
VIP_REGS[BKCOL] ^= 3;
count++;
}
return 0;
}
This reply was modified 13 years, 9 months ago by dasi.
I had a quick look at this a while ago and found that copying word aligned data from WRAM to VRM was approximately 2.5 times faster with [font=Courier]movbsu[/font] compared to a word copier (8.2 vs 20.5 cycles/byte). However, the word copier was quicker when run from the instruction cache (7.1 cycles/byte).
[font=Courier]copymem[/font] is a byte copier with a 16-bit loop variable so blitter’s bit string copier must be at least ten times faster.
Homebrew is not the same as public domain. If you intend to distribute the ROMs you’ve collected you should first obtain the permission of the authors.
rubengar, if you upload your graphics, I’ll look at getting your project working with grit. It’d mean you’d be able to have all your graphics in a single file.
If it’s the same tool as sold here (it looks the same), the shank is either 52 or 56 mm long, which isn’t long enough to get at the two deepest screws.
No, but I don’t think your code would work anyway; [font=Courier]posprintf[/font] takes a variable list of arguments, not a [font=Courier]va_list[/font].