Skip to content

Conversation

cam900
Copy link
Contributor

@cam900 cam900 commented Sep 14, 2025

  • Sprite emulation is still in each driver, because per-driver sprite quirks are remains (sprite RAM bank, draw list length, sprite size, etc)
  • konami/ironhors.cpp: Fix notes, Use generic gfxdecode layout
  • konami/ddribble.cpp, konami/finalizr.cpp, konami/ironhors.cpp, konami/jackal.cpp: Fix naming, Use BIT macro for single bit value

- Sprite emulation is still in each drivers, because per-driver sprite quirks are remains (sprite RAM bank, draw list length, sprite size, etc)
- konami/ironhors.cpp: Fix notes, Use generic gfxdecode layout
- konami/ddribble.cpp, konami/finalizr.cpp, konami/ironhors,cpp, konami/jackal.cpp: Fix naming, Use BIT macro for single bit value
Copy link
Member

@cuavas cuavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it a bit concerning that despite merging functionality duplicated in four systems to a common location, this ends up adding about 20% more lines than it removes (including other general cleanup), and also the sprite drawing is still implemented in all the system drivers.

How much is actually being shared here? If the sprite functionality is actually provided by the K005885 chip, what’s preventing it from being shared as well?

Comment on lines 35 to 48
u8 ctrl_r(offs_t offset) { return (offset >= 5) ? 0 : m_ctrlram[offset & 7]; } // not from addressmap
void ctrl_w(offs_t offset, u8 data);

// scroll RAM
u8 scroll_r(offs_t offset) { return m_scrollram[offset & 0x3f]; }
void scroll_w(offs_t offset, u8 data) { m_scrollram[offset & 0x3f] = data; }

// tilemap RAM
u8 vram_r(offs_t offset) { return m_vram[offset]; }
void vram_w(offs_t offset, u8 data);

// sprite RAM
u8 spriteram_r(offs_t offset) { return m_spriteram[offset]; }
void spriteram_w(offs_t offset, u8 data) { m_spriteram[offset] = data; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use device maps and possibly avoid a layer of function calls for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be, but some hardware allowed to reads these registers.

@cam900
Copy link
Contributor Author

cam900 commented Sep 16, 2025

I find it a bit concerning that despite merging functionality duplicated in four systems to a common location, this ends up adding about 20% more lines than it removes (including other general cleanup), and also the sprite drawing is still implemented in all the system drivers.

How much is actually being shared here? If the sprite functionality is actually provided by the K005885 chip, what’s preventing it from being shared as well?

  1. Tilemap registers and structure(2x32x32 width or 1x64x32 width tilemap - controlled by register?) are shared, also sprite RAM bank and flipscreen bits too.
  2. I think sprite size(some has 16x16 minimum sprite size, some has 8x8), structure, code, color index and x position(some has 8 bit x position and some has 9 bit signed.) is depended by hardware.
  3. Following to 2., code and color index are available to modify through callback in common sprite draw routine.

@galibert
Copy link
Member

Is there a schematic available with a 005885 on it?

@cam900
Copy link
Contributor Author

cam900 commented Sep 16, 2025

Is there a schematic available with a 005885 on it?

https://arcarc.xmission.com/PDF_Arcade_Manuals_and_Schematics/Iron%20Horse.pdf has schematics for ironhors, last page mentioned 005885.

https://arcarc.xmission.com/PDF_Arcade_Manuals_and_Schematics/Double%20Dribble%20Schematics.pdf is for ddribble.

… register map

konami/finalizr.cpp, konami/ironhors.cpp: Reduce duplicates in gfx layouts

- screen_device in sprite_delegate is for priority map in screen.
@galibert
Copy link
Member

galibert commented Sep 16, 2025

Thanks, interesting chip.

It has a bus for graphics roms that's 16bits*65536, where the games (at least ddribble) do banking to fit more. It has 8bits*65536 dram connected called "F", and a 8bits*8192 of sram called "X" and "V". Those must include tilemaps and sprite lists, but the dram makes me wonder what it's used for. There is also two ports from proms, one that gives 4 bits of VCB and VCF and expects 4 bits of VCD, and one with OCB and OCF and expects OCD. Iron Horse has proms, ddribble directly connects B to D. I wonder if the different attributes interpretations are due to that. What is sure is that we don't seem to be using those proms in Iron Horse (but we have them). The color output is 5 bits.

If we want to implement a common version we need to take the proms and the address banking into account I guess. And it means understanding the prom ports, what they do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants