What's new

CPS video emulation

AamirM

New member
Hello all,

I am writing my own Neogeo, CPS1/2 emulator. A beta version is available at:

http://www.mytempdir.com/2022594

Neogeo core is finished(almost) and all the games except encrypted ones run fine. Now I am starting the CPS1 core. I have figured out most of the stuff(thanks to MAME) but I am somwhat confused about the video stuff. I don't understand the follwoing:

1) How to find the total number of sprites, and scroll1/2/3 tiles?

2) Whats the difference between a scroll base and scroll base code?(which is used in Callice drv files)

3) Can someone give me a general overview of the tilemap(scrolls) drawing or point me to some doc?

stay safe,

AamirM
 

blueshogun96

A lowdown dirty shame
I don't really know anything about how CPS1/2/3 work, but you can always check the MAME source or ask a MAME dev :)

EDIT: Stupid me, you just said you looked at MAME's code :paperbag:
 
Last edited:

Exophase

Emulator Developer
Hello all,

I am writing my own Neogeo, CPS1/2 emulator. A beta version is available at:

http://www.mytempdir.com/2022594

Neogeo core is finished(almost) and all the games except encrypted ones run fine. Now I am starting the CPS1 core. I have figured out most of the stuff(thanks to MAME) but I am somwhat confused about the video stuff. I don't understand the follwoing:

1) How to find the total number of sprites, and scroll1/2/3 tiles?

2) Whats the difference between a scroll base and scroll base code?(which is used in Callice drv files)

3) Can someone give me a general overview of the tilemap(scrolls) drawing or point me to some doc?

stay safe,

AamirM

I haven't done anything with CPS but I found this:

http://arcadedev.emuvibes.com/documents/cps1.html

Also, this is sourcecode to a couple CPS games/demos:

http://frogfeast.rastersoft.net/CPS1Src.html
http://arcadedev.emuvibes.com/files/cps1demo.zip

This is what I could gather with regard to your quetsions...

1) 256 sprites maximum, last sprite will have an 0xFF00 attribute field. I think that the scrolls have fixed tile sizes and tile map dimensions each. scroll 1 seems to be 64 tiles wide (8x8 large tiles), scroll 2 32 tiles wide (16x16 large tiles), so maybe scroll 3 is 16 tiles wide (32x32 large tiles). That'd make them all 512 pixels wide, and the height seems to be the same.

2) No idea >_> I only see scroll base in the docs/sourcecode which is of course the location of where the scroll maps start in VRAM.

3) Apparently it's stored in planar format (as usual for this). 16 colors per tile/sprite and 32 palettes, so you get 512 colors each - scroll1, scroll2, scroll3, and the sprites each have their own palette of 512 colors. So 2048 colors total. The exact storage of the tiles I'm not really sure about, something about banks... unfortunately all of the tile data in the code is hardcoded and not dynamically created so it's difficult to tell.

The tilemap appears to consist of 2 bytes per tile entry, the docs I linked don't tell you this but those other bits are for the tile number. At the very least it works this way for scroll 1. Again, I don't know where the actual tiles are stored :/ There may only be 256 of them (or 512, or 128 for scroll 2) It's possible that it's stored after the tilemap in the scroll* RAM offset. I speculate this because in the source I've seen they're spaced out much further than they have to be for just the map.

I'm sure emu source code will fill in all the details. There's one CPS emulator for handhelds by someone named NJ, that has source available.. maybe that could help you more. Good luck.
 
OP
A

AamirM

New member
Hi,

Thanks for the info. I figured out the video stuff a little bit and have the street fighters 2:champ edition running upto the character selection screen after which it crashes :(. But thanks again for you help.

stay safe,

AamirM

PS: If anybody used my emu , I just want to let them know that the cheats file are the same as that of WinKawaks\Nebula so you can actually finish the games ;) .
 

Pixman

New member
Hello, your link went offline.

I'd like to try out your emulator, how far have you come?

very interested in working cpu cores :)

Thanks,
Michael
 

Top