summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/seibucop/seibucop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/seibucop/seibucop.cpp')
-rw-r--r--src/mame/machine/seibucop/seibucop.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/mame/machine/seibucop/seibucop.cpp b/src/mame/machine/seibucop/seibucop.cpp
index 72594e43513..280093b0835 100644
--- a/src/mame/machine/seibucop/seibucop.cpp
+++ b/src/mame/machine/seibucop/seibucop.cpp
@@ -49,18 +49,18 @@
- stage 4: has sprite stuck on bottom-left of screen;
- palette dims too much on attract / continue screen.
It's known that the DMA data arrangement gives same results on a real Legionnaire board, so shrug?
- Seibu Cup Soccer
- - Handles collision detection via the 130e/3bb0 macros
- 130e version in this makes a sub instead of an add as last opcode, which in turn reflects with
- the distance (which we do know that is internally loaded somehow).
+ Seibu Cup Soccer
+ - Handles collision detection via the 130e/3bb0 macros
+ 130e version in this makes a sub instead of an add as last opcode, which in turn reflects with
+ the distance (which we do know that is internally loaded somehow).
d104 macro is called before this, it likely sets the range for the 130e snippets.
Example snippet (note: there are multiple calls to 130e)
013F3C: 3D7C 130E 0100 move.w #$130e, ($100,A6) // angle macro
013F42: 302E 01B4 move.w ($1b4,A6), D0 // take the angle
013F46: 082E 000F 01B0 btst #$f, ($1b0,A6) // is status exception flag raised?
013F4C: 6712 beq $13f60
-013F4E: 2228 0004 move.l ($4,A0), D1
-013F52: B2A8 0044 cmp.l ($44,A0), D1 // compares Y value against the next object (yes, cop_regs[1] + 0x40 = cop_regs[0])
+013F4E: 2228 0004 move.l ($4,A0), D1
+013F52: B2A8 0044 cmp.l ($44,A0), D1 // compares Y value against the next object (yes, cop_regs[1] + 0x40 = cop_regs[0])
013F56: 6708 beq $13f60 // if equal then check the distance
013F58: 6E04 bgt $13f5e
013F5A: 7040 moveq #$40, D0 // set angle direction left ...
@@ -69,12 +69,12 @@
013F60: 3D7C 3BB0 0100 move.w #$3bb0, ($100,A6) // dist macro
013F66: 1140 003D move.b D0, ($3d,A0) // move angle value to [0x3d]
013F6A: 4E75 rts
- Zero Team
- - Some faulty collision detection, e.g. crate in front of aquarium in stage 1
- - Bird Boss jumps to wrong direction
- the sequence called is:
- write to reg 4 then execute 0xfc84 and 0xf790, finally reads the distance.
-
+ Zero Team
+ - Some faulty collision detection, e.g. crate in front of aquarium in stage 1
+ - Bird Boss jumps to wrong direction
+ the sequence called is:
+ write to reg 4 then execute 0xfc84 and 0xf790, finally reads the distance.
+
Tech notes (to move into own file with doxy mainpage):
-----------
[0x6fc] DMA mode bit scheme:
@@ -83,16 +83,16 @@
---- ---- ---x ---- internal buffer selector
---- ---- ---- x--- size modifier? Bus transfer size actually?
---- ---- ---- -xxx select channel
-
- work RAM object structure (in seibu cup soccer)
- all object have a [0x40] boundary
- [0x04-0x07] Y position
- [0x08-0x0b] X position
- [0x10-0x13] Y offset (a.k.a. calculated sine)
- [0x14-0x17] X offset (a.k.a. calculated cosine)
- [0x37] angle direction
- TOC
- [0x11381c] ball object
+
+ work RAM object structure (in seibu cup soccer)
+ all object have a [0x40] boundary
+ [0x04-0x07] Y position
+ [0x08-0x0b] X position
+ [0x10-0x13] Y offset (a.k.a. calculated sine)
+ [0x14-0x17] X offset (a.k.a. calculated cosine)
+ [0x37] angle direction
+ TOC
+ [0x11381c] ball object
***************************************************************************/
@@ -316,7 +316,7 @@ WRITE16_MEMBER(raiden2cop_device::cop_pgm_data_w)
cop_func_value[idx] = cop_latch_value;
cop_func_mask[idx] = cop_latch_mask;
bool upper_regs = ((cop_latch_trigger >> 10) & 1) == 1; // f1
-
+
if(data) {
int off = data & 31;
int reg = ((data >> 5) & 3) + (upper_regs == true ? 4 : 0);
@@ -325,7 +325,7 @@ WRITE16_MEMBER(raiden2cop_device::cop_pgm_data_w)
logerror("COPDIS: %04x s=%02x f1=%x l=%x f2=%02x %x %04x %02x %03x %02x.%x.%02x ", cop_latch_trigger, (cop_latch_trigger >> 11) << 3, (cop_latch_trigger >> 10) & 1, ((cop_latch_trigger >> 7) & 7)+1, cop_latch_trigger & 0x7f, cop_latch_value, cop_latch_mask, cop_latch_addr, data, op, reg, off);
off *= 2;
-
+
// COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 00 188 03.0.08 read32 10(r0)
// COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 01 282 05.0.02 add32 4(r0)
// COPDIS: 0205 s=00 f1=0 l=5 f2=05 6 ffeb 02 082 01.0.02 write32 4(r0)
@@ -763,13 +763,13 @@ WRITE16_MEMBER(raiden2cop_device::cop_dma_trigger_w)
case 0x85:
case 0x86:
case 0x87:
- {
+ {
dma_palette_brightness();
break;
}
/********************************************************************************************************************/
- case 0x09:
+ case 0x09:
{
UINT32 src, dst, size;
int i;
@@ -1145,7 +1145,7 @@ WRITE16_MEMBER( raiden2cop_device::cop_cmd_w)
case 0x7e05:
execute_7e05(offset, data);
break;
-
+
case 0xa100:
case 0xa180:
execute_a100(offset, data); // collisions
@@ -1585,9 +1585,9 @@ WRITE16_MEMBER(raiden2cop_device::LEGACY_cop_cmd_w)
return;
}
/*
- [:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 50 a80 15.0.00 [:raiden2cop] sub32 (r0)
- [:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 51 984 13.0.04 [:raiden2cop] write16h 8(r0)
- [:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 52 082 01.0.02 [:raiden2cop] addmem32 4(r0)
+ [:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 50 a80 15.0.00 [:raiden2cop] sub32 (r0)
+ [:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 51 984 13.0.04 [:raiden2cop] write16h 8(r0)
+ [:raiden2cop] COPDIS: 5105 s=50 f1=0 l=3 f2=05 5 fefb 52 082 01.0.02 [:raiden2cop] addmem32 4(r0)
*/
if (check_command_matches(command, 0xa80, 0x984, 0x082, 0x000, 0x000, 0x000, 0x000, 0x000, 5, 0xfefb))
@@ -1608,14 +1608,14 @@ WRITE16_MEMBER(raiden2cop_device::LEGACY_cop_cmd_w)
printf("5905\n");
return;
}
-
+
// player to ball collision
if (check_command_matches(command, 0xa88, 0x994, 0x088, 0x000, 0x000, 0x000, 0x000, 0x000, 5, 0xfefb))
{
execute_f105(offset,data);
return;
}
-
+
if (executed == 0)
{
printf("did not execute %04x\n", data); // cup soccer triggers this a lot (and others)