diff options
| author | 2010-11-28 12:16:18 +0000 | |
|---|---|---|
| committer | 2010-11-28 12:16:18 +0000 | |
| commit | 6aea3af6c1723a45662a0d915b370afb34c72736 (patch) | |
| tree | c0d669e65118e6137c7d3aa5e7dedabb9f69684f | |
| parent | f24bd1e5b4669382f46480ee49304d2e97410d1f (diff) | |
Improved some documentation, not worth again
| -rw-r--r-- | src/mame/drivers/pgm.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index baf546f0808..ac351717f40 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -1313,7 +1313,10 @@ GFXDECODE_END static INTERRUPT_GEN( drgw_interrupt ) { if (cpu_getiloops(device) == 0) + { + //printf("vbl\n"); cpu_set_input_line(device, 6, HOLD_LINE); + } else cpu_set_input_line(device, 4, HOLD_LINE); } @@ -5405,7 +5408,7 @@ static DRIVER_INIT( kovqhsgs ) before everything. */ -static UINT16 value0, value1, valuekey; +static UINT16 value0, value1, valuekey, ddp3lastcommand; static UINT32 valueresponse; static WRITE16_HANDLER( ddp3_asic_w ) @@ -5433,12 +5436,30 @@ static WRITE16_HANDLER( ddp3_asic_w ) value1 = data; value0 ^= realkey; - int command = value1 & 0xff; + ddp3lastcommand = value1 & 0xff; - switch (command) + /* typical frame (ddp3) (all 3 games use only these commands? for the most part of levels espgal just issues 8e) + vbl + 145f28 command 67 + 145f70 command e5 + 145f28 command 67 + 145f70 command e5 + 1460c6 command 40 + 145ec0 command 8e + */ + + switch (ddp3lastcommand) { default: - printf("command %02x\n", command); + printf("%06x command %02x | %04x\n", cpu_get_pc(space->cpu), ddp3lastcommand, value0); + valueresponse = 0x880000; + break; + + case 0x40: + case 0x67: + case 0x8e: + case 0xe5: + printf("%06x command %02x | %04x\n", cpu_get_pc(space->cpu), ddp3lastcommand, value0); valueresponse = 0x880000; break; @@ -5466,7 +5487,9 @@ static READ16_HANDLER( ddp3_asic_r ) realkey |= valuekey; d ^= realkey; - return d; +// return d; + return d & 0xff; // hack, keeps it going a bit longer + } else if (offset == 1) { |
