|
|
| version 1.12, 2004/02/18 03:56:57 | version 1.16, 2004/02/20 16:20:41 |
|---|---|
| Line 20 typedef struct { | Line 20 typedef struct { |
| SINT16 y2; | SINT16 y2; |
| } VECTDIR; | } VECTDIR; |
| const UINT32 gdcplaneseg[4] = {VRAM_E, VRAM_B, VRAM_R, VRAM_G}; | |
| static UINT16 gdc_rt[RT_TABLEMAX+1]; | static UINT16 gdc_rt[RT_TABLEMAX+1]; |
| static const VECTDIR vectdir[16] = { | static const VECTDIR vectdir[16] = { |
| Line 85 REG8 gdcbitreverse(REG8 data) { | Line 87 REG8 gdcbitreverse(REG8 data) { |
| #endif | #endif |
| void gdcsub_init(void) { | void gdcsub_initialize(void) { |
| int i; | int i; |
| Line 102 void gdcslavewait(NEVENTITEM item) { | Line 104 void gdcslavewait(NEVENTITEM item) { |
| } | } |
| } | } |
| void gdcsub_setslavewait(UINT32 wait) { | |
| SINT32 clk; | |
| clk = nevent_getremain(NEVENT_GDCSLAVE); | |
| if (clk < 0) { | |
| clk = 0; | |
| } | |
| gdc.s_drawing = 8; // GDC DRAWING! | |
| nevent_set(NEVENT_GDCSLAVE, clk + wait, gdcslavewait, NEVENT_ABSOLUTE); | |
| } | |
| static void calc_gdcslavewait(UINT dots) { | static void calc_gdcslavewait(UINT dots) { |
| SINT32 clk; | SINT32 clk; |
| clk = dots; | clk = dots; |
| if (pccore.baseclock != PCBASECLOCK20) { | if (pccore.cpumode & CPUMODE_8MHZ) { |
| clk *= 27648; | clk *= 22464; |
| } | } |
| else { | else { |
| clk *= 22464; | clk *= 27648; |
| } | } |
| clk *= pccore.multiple; | clk *= pccore.multiple; |
| clk /= 15625; | clk /= 15625; |
| clk += 30 * pccore.multiple; | clk += 30 * pccore.multiple; |
| gdc.s_drawing = 8; // GDC DRAWING! | gdcsub_setslavewait(clk); |
| nevent_set(NEVENT_GDCSLAVE, clk, gdcslavewait, NEVENT_ABSOLUTE); | |
| } | } |
| void gdcsub_vect0(UINT32 csrw, const GDCVECT *vect, REG16 pat, REG8 ope) { | void gdcsub_vect0(UINT32 csrw, const GDCVECT *vect, REG16 pat, REG8 ope) { |
| Line 546 void gdcsub_write(void) { | Line 559 void gdcsub_write(void) { |
| } | } |
| gdcs.grphdisp |= (BYTE)updatebit; | gdcs.grphdisp |= (BYTE)updatebit; |
| ptr += vramplaneseg[(adrs >> 14) & 3]; | ptr += gdcplaneseg[(adrs >> 14) & 3]; |
| adrs = (adrs & 0x3fff) << 1; | adrs = (adrs & 0x3fff) << 1; |
| calc_gdcslavewait(leng); | calc_gdcslavewait(leng); |