
-ud
Code: Select all
CPS1 CPS2
Base 800140 804140
ctrl 0x26 800166 804166
mask0 0x28 800168 804168*
mask1 0x2a 80016a 80416a*
mask2 0x2c 80016c 80416c*
mask3 0x2e 80016e 80416e*
palet 0x30 800170 804170
Code: Select all
804166 : ---- ---- ---- --0- : BG0 enable (1= on, 0= off)
---- ---- ---- -1-- : BG1 enable (1= on, 0= off)
---- ---- ---- 2--- : BG2 enable (1= on, 0= off)
---- ---- ---s ---- : Starfield 1 enable (1=on, 0=off)
---- ---- --s- ---- : Starfield 2 enable (1=on, 0=off)
--aa bbcc dd-- ---- : Priority related *
Code: Select all
CPS1
AM_RANGE(0x800100, 0x80013f) AM_WRITE(cps1_cps_a_w) AM_SHARE("cps_a_regs") /* CPS-A custom */
AM_RANGE(0x800140, 0x80017f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) AM_SHARE("cps_b_regs") /* CPS-B custom
CPS2
AM_RANGE(0x804100, 0x80413f) AM_WRITE(cps1_cps_a_w) AM_SHARE("cps_a_regs") /* CPS-A custom */
AM_RANGE(0x804140, 0x80417f) AM_READWRITE(cps1_cps_b_r, cps1_cps_b_w) /* CPS-B custom */
Code: Select all
AM_RANGE(0x400000, 0x40000b) AM_RAM AM_SHARE("output") /* CPS2 object output */
But where does the sprite generator exist on cps-1..?The sprite generator registers are moved from 400000-40000F to FFFFF0-FFFFFF when the battery is dead.
Code: Select all
Daimakaimura CPS-A boot write values:
800122 -> 000E set video control
800100 -> 9200 set OBJ memory memory base address
800102 -> 9000 set SCROLL1 memory memory base address
800104 -> 9040 set SCROLL2 memory memory base address
800106 -> 9080 set SCROLL3 memory memory base address
80010C -> FFC0 set SCROLL1 X
80010E -> 0000 set starfield 2 Y (why?)
80010A -> 9105 set palette memory base address
Ingame CPS-A write values: (while in service mode)
80010A -> 9100 palette memory base address
800122 -> 400E video control
800102 -> 9000 SCROLL1 memory memory base address
800104 -> 9040 SCROLL2 memory memory base address
800106 -> 9080 SCROLL3 memory memory base address
800100 -> 9200 OBJ memory memory base address
80010C -> 0000 SCROLL1 X
80010E -> 0000 starfield 2 Y
800110 -> 0000 SCROLL2 X
800112 -> 0000 SCROLL2 Y
800114 -> 0000 SCROLL3 X
800116 -> 0000 SCROLL3 Y
(loops over)
Code: Select all
Final Fight CPS-A boot write values:
800122 -> 000E set video control
800100 -> 9000 set OBJ memory memory base address
800102 -> 9080 set SCROLL1 memory memory base address
800104 -> 90C0 set SCROLL2 memory memory base address
800106 -> 9100 set SCROLL3 memory memory base address
80010C -> FFC0 set SCROLL1 X
80010E -> 0000 set starfield 2 Y (why?)
80010A -> 9140 set palette memory base address
Ingame CPS-A write values: (blank screen, while in service mode)
800100 -> 9000 OBJ memory memory base address
80010A -> 9140 palette memory base address
80010C -> 0000 SCROLL1 X
800110 -> FFC0 SCROLL2 X
800114 -> FFC0 SCROLL3 X
800118 -> 0000 starfield1 X
800118 -> 0000 starfield1 X (yep, two writes)
80010E -> 0000 SCROLL1 Y
800112 -> 0300 SCROLL2 Y
800116 -> 0700 SCROLL3 Y
80011A -> 0100 starfield1 Y
80011E -> 0100 starfield2 Y
800120 -> 0000 rowscroll matrix offset
800122 -> 000E video control
(loops over)
For the input fixes on punisher, i just replaced the load to D0 with JMP mysub, and located mysub in a new 27C4096 'puniconv.06' so to sayA spoiler would be look the way SF Zero for CPS changer set up it's video memory, because it's a CPS1 game using CPS2 memory map.
Now, out to study a "sensible" way of "patching" the game.
That is the init for the CPS2 specific sprites hardware. Set the CPS2 specific sprites layer X/Y placement and crashes the board when it's suicided. (you will learn about that when you try to load it on your real hardware. that's one of the things I often have to fix on the CPS2 sets before releasing them)Asure wrote:We're missing some init of the sprite handler at least. This is from a CPS2 game (phoenix ver)
None of the cps-1 games do this..
And, from Layer, early on in the topic:/*
I don't know if CPS2 ROM boards use PALs as well; since all games seem to be
well behaved, I'll just assume that there is no strong checking of gfx type.
(sprites are not listed here because they are addressed linearly by the CPS2
sprite code)
*/
Layer wrote:First, you should try comparing SF Zero CPS Changer with Zero CPS-2 to get some points to compare. Btw, in Zero CPS Changer, the Gfx are already lineary adressed as CPS-2 games too.
Mame video driver says that a few games boot with 0F pal value instead of 3F but that doesn't change the game, if you apply 3F instead of 0F at start up, you'll get a black screen instead of boot up checks and game version before the disclaimer... all erased, that's all.Asure wrote:804xxx is where they are 'supposed' to be on cps2. At least, that is an assumption made by looking at the cps2 games.
It could be a side effect of MAME since the emulator expects to be running a cps-2 game with linear addressing. There are still many points where mame falls short of the 'real thing' so to say.
Even if they are mapped at 8041xx there is still a mirror of these at base 0x800140 set up in the mame source, which i expect to exist on real hardware as well.
I made a few tests with hardcoded layer prio values (12CE, 12DE and so on) but sprites never became visible, so there is something else we are missing.
PALCTRL (800170/804170) is a decent hint though, as bit 0 controls page 0 which is sprites.
There is a mystery bit. CTRL (800166/804166) bit 0 is documented as 'possible rowscroll' in the source, but if you compare it against PALCTRL then bit 0 might be referring to the sprite layer.
Still, this seems odd, as the CPS2 games write 3F there, and 68000 uses LSB, so the last four bits are 3/2/1/0 = 1/1/1/1 = F. (Punisher writes 3F there too.)