Previous 199869 Revisions Next

r30784 Monday 2nd June, 2014 at 21:14:25 UTC by Alex Jackson
k053252.c: fix an off-by-one error, allowing various Konami games to actually match their Guru-measured vsyncs (nw)
[src/emu/machine]k053252.c

trunk/src/emu/machine/k053252.c
r30783r30784
2525xexex:     01 FF 00 21 00 37 01 00 00 20 0C 0E 54 00 00 00 384x256 ~ 384x256 (*)
2626(all konamigx, cowboys of moo mesa, run & gun, dj main)
2727
28(*) hblank duration 512 (0x200), hdisp 384 (0x180), vblank duration 288 (0x120), vdisp 256 (0x100)
28(*) hcount total 512 (0x200), hdisp 384 (0x180), vcount total 289 (0x121), vdisp 256 (0x100)
2929
3030     Definitions from GX, look similar, all values big-endian, write-only:
3131
32    0-1: bits 9-0: HC        - Total hblank duration (-1)     Hres ~ (HC+1) - HFP - HBP - 8*(HSW+1)
32    0-1: bits 9-0: HC        - Total horizontal count (-1)  Hres ~ (HC+1) - HFP - HBP - 8*(HSW+1)
3333    2-3: bits 8-0: HFP       - HBlank front porch
3434    4-5: bits 8-0: HBP       - HBlank back porch
3535    6  : bits 7-0: INT1EN
3636    7  : bits 7-0: INT2EN
37    8-9: bits 8-0: VC        - Total vblank duration
38    a  : bits 7-0: VFP       - VBlank front porch             Vres ~ VC - VFP - VBP - (VSW+1)
39    b  : bits 7-0: VBP       - VBlank back porch
37    8-9: bits 8-0: VC        - Total vertical count (-1)    Vres ~ (VC+1) - VFP - (VBP+1) - (VSW+1)
38    a  : bits 7-0: VFP       - VBlank front porch
39    b  : bits 7-0: VBP       - VBlank back porch (-1) (?)
4040    c  : bits 7-4: VSW       - V-Sync Width
4141    c  : bits 3-0: HSW       - H-Sync Width
4242    d  : bits 7-0: INT-TIME
r30783r30784
4949TODO:
5050- xexex sets up 0x20 as the VC? default value?
5151- xexex layers are offsetted if you try to use the CCU
52- according to p.14-15 both HBP and VBP have +1 added, but to get correct visible areas you have to add it only to VBP
5253- understand how to interpret the back / front porch values, and remove the offset x/y hack
5354- dual screen support (for Konami GX types 3/4)
5455- viostorm and dbz reads the VCT port, but their usage is a side effect to send an irq ack thru the same port:
r30783r30784
171172      case 0x01:
172173         m_hc  = (m_regs[1]&0xff);
173174         m_hc |= ((m_regs[0]&0x03)<<8);
174         m_hc ++;
175         m_hc++;
175176         logerror("%d (%04x) HC set\n",m_hc,m_hc);
176177         res_change();
177178         break;
r30783r30784
195196      case 0x09:
196197         m_vc  = (m_regs[9]&0xff);
197198         m_vc |= ((m_regs[8]&0x01)<<8);
199         m_vc++;
198200         logerror("%d (%04x) VC set\n",m_vc,m_vc);
199201         res_change();
200202         break;
r30783r30784
205207         break;
206208      case 0x0b:
207209         m_vbp  = (m_regs[0x0b]&0xff);
210         m_vbp++;
208211         logerror("%d (%04x) VBP set\n",m_vbp,m_vbp);
209212         res_change();
210213         break;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team