Skip to content

Conversation

cbrunschen
Copy link
Contributor

@cbrunschen cbrunschen commented Oct 18, 2025

This includes implementing some more display commands that are used on the VFX family, and correcting edge-of-screen behaviour to match what is observed there.

Also adds underlines to the 1x22 character VFD, for consistency with the 2x40 displays.

@cbrunschen cbrunschen marked this pull request as ready for review October 18, 2025 11:53
#define VERBOSE 0
#include "logmacro.h"

template <typename Format, typename... Params> inline static void logerror(Format &&fmt, Params &&... args) {
Copy link
Member

Choose a reason for hiding this comment

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

what?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, removed.

* led14seg. Bit 14 activates the dot after a character; bit 15 the underline.
* See layout/{vfx|vfxsd|sd1}.lay .
*/
static const uint16_t font_vfx[] = {
Copy link
Member

Choose a reason for hiding this comment

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

tradition by now is to make that a device rom

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK - does that mean as a ROM file to go along with the dumped ROMs, Or something else? Could you point me to an example?

Copy link
Member

Choose a reason for hiding this comment

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

The sin table from swp30.cpp for instance? Or the font in mulcd.cpp.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like this?

esq2x40_vfx.zip

Copy link
Member

Choose a reason for hiding this comment

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

Looks good

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 tried to do the same thing with the existing font in there; but that resulted in every variant needing its own copy of that ROM file. That does work, but the duplication of that ROM seems a bit suboptimal. Also, the "esq2x40_device" doesn't seem to be used anywhere; instead there's an "esq2x16_device" in a separate file, esqlcd.cpp, which nevertheless inherits from esqvfd_device, but which clearly does not need the VFD font. I think that's a situation that warrants sorting out before trying to move the existing font into a ROM file.

ESQ2X40(config, m_vfd, 60);
ESQ2X40_VFX(config, m_vfd, 60);

const std::string &name = owner()->shortname();
Copy link
Member

Choose a reason for hiding this comment

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

switching on a name of something elsewhere has often been problematic over time. Could you switch that to a config method called at the upper level in machinf config?

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'm now passing the "panel type" in when I add the panel in esq5505_device's various configuration methods; is that better?

I also tried just using set_default_layout() in the esq5505_device's various configuration methods, but then the layout tries to find its input ports etc directly in that device rather than in the panel where they actually live (on the real devices, the buttons are connected to the display panel board, not to the main CPU board).

Copy link
Member

Choose a reason for hiding this comment

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

Yep, passing though the constructor is a good method. You're not going to break it by casually changing a device or driver name that way.

else if (m_panel_type == VFX_SD)
config.set_default_layout(layout_vfxsd);
else if (m_panel_type == SD_1 || m_panel_type == SD_1_32)
config.set_default_layout(layout_sd1);
Copy link
Member

Choose a reason for hiding this comment

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

something went wrong with the indentation just there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, some spaces snuck in instead of a tab.

Copy link
Contributor

Choose a reason for hiding this comment

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

I always run the MAME srcclean tool on files before I commit them. It helps normalize tabs/spaces and everything.

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 shall do that!

esqpenal.{h,cpp}: Remove errant logerror function.
Pass the panel type into the esqpanel2x40_vfx_device constructor, and use that to specify the layout to use.

esq5505.cpp: in the various keyboard configuration methods in the VFX family, pass the correct panel type.
Also move the cartridge and panel from common() to vfx(), since the eps family for example use common() but have no cartridge, and a different panel which they were replacing.

Also add a fallback layout with just the VFD, for those devices that are currently using the esqpanel2x40_vfx_device panel
even though they're not actually in the VFX family.
esq2x40_vfx_device::esq2x40_vfx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
esq2x40_device(mconfig, ESQ2X40_VFX, tag, owner, clock)
{
}
Copy link
Member

Choose a reason for hiding this comment

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

missing blank line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be fixed

1. Fix indentation in esqpanel.cpp
2. Move the VFX-style VFD font to a ROM file
@MooglyGuy
Copy link
Contributor

Looks good to my eyes, but I leave it up to @galibert to merge since he's been doing the review. :)

@galibert
Copy link
Member

I'm waiting for the CI to pass, it gets reset with each push.

@cbrunschen
Copy link
Contributor Author

It's definitely better to make sure it's all good. CI and such are there for a reason!

@galibert galibert merged commit 83b228e into mamedev:master Oct 20, 2025
7 checks passed
@cbrunschen
Copy link
Contributor Author

Thank you!

@cbrunschen cbrunschen deleted the vfx_panel_2 branch October 20, 2025 07:49
@felipesanches
Copy link
Contributor

Thanks, @cbrunschen!

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.

5 participants