Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

excellent/excellent_spr.cpp: Fix sprite delay, Cleanups/updates: #13213

Merged
merged 3 commits into from
Jan 19, 2025

Conversation

cam900
Copy link
Contributor

@cam900 cam900 commented Jan 11, 2025

excellent/excellent_spr.cpp:

  • Reduce duplicates
  • Remove unused variable
  • Use decode_gfx for gfx decoding routine
  • Fix docs

excellent/gcpinbal.cpp:

  • Fix background tilemap bankswitching
  • Use ROMREGION_ERASE00 for Fill empty ROM area

- Fix background tilemap bankswitching
- Use ROMREGION_ERASE00 for Fill empty ROM area
…excellent/excellent_spr.cpp, Cleanups:

excellent/excellent_spr.cpp:
- Reduce duplicates
- Remove unused variable
- Use decode_gfx for gfx decoding routine
- Fix docs
@cam900 cam900 changed the title excellent/gcpinbal.cpp: Fix sprite delay, Minor updates: excellent/excellent_spr.cpp: Fix sprite delay, Cleanups/updates: Jan 18, 2025
Comment on lines +82 to +86
void excellent_spr_device::vblank(int state)
{
if (state)
std::copy_n(&m_ram[0], 0x1000, &m_ram_buffered[0]);
}
Copy link
Member

Choose a reason for hiding this comment

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

Does the hardware appear to use DMA to copy the data like this, or does it simply swap the buffer currently accessible to the CPU with the buffer that it draws from?

You may be able to work this out by looking at what the main program expects to see when reading from sprite RAM. Does it need to see the contents of the most recent frame, or will it work if it sees the contents from the previous frame?

If it works seeing the contents from the previous frame, it’s likely just exchanging buffers, and you can implement it by exchanging a pair of pointers rather than copying from one buffer to the other. If it needs to see the contents of the most recent frame, it’s likely using DMA, which means the copy here is accurate.

If it’s using DMA, is the CPU halted or prevented from accessing sprite RAM during DMA? (For example some Capcom games like Ghosts ’n Goblins block CPU bus accesses during sprite DMA, although MAME does not emulate this.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's DMA, there's 2 6116 (2kword x 8bit) RAMs (possibly sprite RAM) are mentioned in gcpinbal and aquarium PCB docs. But I don't think the CPU is halted or prevented from accessing sprite RAM during DMA.

Copy link
Member

Choose a reason for hiding this comment

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

How would it work in that case? It’s unlikely the RAM is clocked at double the CPU speed to allow transparent sprite RAM DMA.

@cuavas cuavas merged commit 98e21bb into mamedev:master Jan 19, 2025
5 checks passed
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.

2 participants