Tomaitheous Elder
Joined: 27 Sep 2005 Posts: 306 Location: Tucson
|
Posted: Fri Jul 07, 2006 11:54 pm Post subject: custom Hsync lib routine for HuC w/ SGX support |
|
|
This is a custom VDC irq1 routine for HuC 'C' compiler - it's a WIP. The code is written in ASM.
Here's a rundown of the features.
- Hsync routine with a 64 individual line attachment array. You can update the VDC1 BG x/y, the VDC2 BG x/y, the VPC regs($0008/$0009), or any combonation including all three at once.
- Mid frame temporary switching of Hsync routines. You can tact the hsync switch request on the same line as the above parameters. The default Hsync routine has 64 entrys and the mid frame switch request can be attached to all 64 slots, since it returns control of the IRQ1 vector to the parent Hsync routine when it's finished.
- Normal Hsync switching routine. Takes effect during the first available vblank. The Hsync routine is not switch back to the default routine like in the above mode. The user must switch it back with another Hsync switch call.
- A WIP sin wave BG Hsync routine for VDC1 & VDC2. An 16-bit reg is loaded from the sin wave array. The MSB is the number if scanlines the routine is active( before switching back to primary Hsync routine if not set as the primary routine). The LSB is the control mask for the display attributes. So far only 'reset Y' for SGX/PCE(bit0-1) is recognised in the mask. The sin wave routine reads from a 256byte array(_sin:) loaded into the const bank. I provided a sample sinwave.dat.
- Initialize and restore functions for giving IRQ1 control back to HuC lib.
- A few other replacement and new functions like PCE scroll X/Y, SGX scroll X/Y, Vblank(char) to replace Vsync(char), etc.
Download here - http://pcedev.net/HuC/user_irq1_rtn.zip.
Any ideas/requests for other custom hsync routines?
-Rich _________________ www.pcedev.net |
|