Skip to content

Conversation

cbrunschen
Copy link
Contributor

@cbrunschen cbrunschen commented Oct 15, 2025

The VFX family of keyboards have a 3V lithium battery that keeps their RAM powered, which makes it effectively non-volatile.

Each has 64 kBytes of OS RAM (2 * 62256 32k x 8 SRAM). The VFX-SD and SD-1 have a base amount of sequencer memory, 64 kB in 2 * 62256 SRAM chips, mapped 0x330000 .. 0x33ffff.

Both of those can also accommodate the "SQX-70" sequencer memory expansion, which is simply 2 * 621001, 128k x 8 SRAM chips for another 256 kB of sequencer RAM, mapped 0x340000 .. 0x37ffff.

The SQX-70 is included by default in the SD-1/32 voice; and it's also included by default in the emulated vfxsd and sd1 devices as well as the sd132.

This PR:

  • corrects the end address of Sequencer RAM that is mapped in the VFXSD memory map

  • adds the device_nvram_interface to the esq5505_state class, but disabled by default

  • enabled nvram for the VFX family of devices, in which case it loads and stores:

    • all of OS RAM, 64 kBytes
    • if present, all of Sequencer RAM, 64 + 256 = 320 kByte

    for a total of 64 kBytes for the VFX / 384 kBytes for the VFX-SD, SD-1 and SD-1/32

The VFX family of keyboards have a 3V lithium battery that keeps their RAM powered, which makes it effectively non-volatile.

Each has 64 kBytes of OS RAM (2 * 62256 32k x 8 SRAM).
The VFX-SD and SD-1 have a base amount of sequencer memory, 64 kB in 2 * 62256 SRAM chips, mapped 0x330000 .. 0x33ffff.

Both of those can also accommodate the "SQX-70" sequencer memory expansion, which is simply 2 * 621001, 128k x 8 SRAM chips for another 256 kB of sequencer RAM, mapped 0x340000 .. 0x37ffff.

The SQX-70 is included by default in the SD-1/32 voice; and it's also included by default in the emulated vfxsd and sd1 devices as well as the sd132.

This PR:
- corrects the amount of Sequencer RAM that is mapped in the VFX and VFXSD memory maps
- adds the device_nvram_interface to the esq5505_state class, but disabled by default
- enabled nvram for the VFX family of devices, in which case it loads and stores:
  - all of OS RAM, 64 kBytes
  - if present, all of Sequencer RAM, 64 + 256 = 320 kBytes
  for a total of 64 kBytes for the VFX / 384 kBytes for the VFX-SD, SD-1 and SD-1/32
@cbrunschen cbrunschen marked this pull request as ready for review October 16, 2025 06:01
{
std::fill(m_ram.begin(), m_ram.end(), 0);
if (m_seqram)
std::fill(m_ram.begin(), m_ram.end(), 0);
Copy link
Member

@galibert galibert Oct 16, 2025

Choose a reason for hiding this comment

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

seqram there?

But I don't think that complexity is needed. Just add a pair of NVRAM devices with names "seqram" and "osram" and they'll handle saving, loading and default for you. See yamaha/ymmu50.cpp for a trivial example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seqram there?

Absolutely, thank you for spotting that!

But I don't think that complexity is needed. Just add a pair of NVRAM devices with names "seqram" and "osram" and they'll handle saving, loading and default for you. See yamaha/ymmu50.cpp for a trivial example.

Even better! I wasn't aware of that, thank you for pointing that out, I learn something new every day.

It does mean a had to do a bit of restructuring: pretty much every device was using the vfx(config) setup in some fashion, and the ks32 was using the same setup as the sd132 but does not have a "seqram" region; so I factored out the common 21- and 32-voice setups and only add the NVRAM devices where I know that nvram is actually in use.

@galibert galibert merged commit 56738da into mamedev:master Oct 16, 2025
6 checks passed
@cbrunschen
Copy link
Contributor Author

Thank you!

@cbrunschen cbrunschen deleted the vfx_nvram branch October 16, 2025 21:13
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