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?