Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: GroovyMAME 0.287 - Switchres 2.22b  (Read 457164 times)

0 Members and 12 Guests are viewing this topic.

arc11

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:Yesterday at 09:59:50 am
  • I want to build my own arcade controls!
Re: GroovyMAME 0.287 - Switchres 2.22b
« Reply #520 on: May 13, 2026, 01:15:54 pm »
Last year while I was searching for a workaround, I found odd in the lines :

    // determine the scale factor
-   float scale_factor = target_font_height() * scale / one_to_one_line_height;
+   float scale_factor = std::min(target_pixel_height / float(raw_font_pixel_height) / options().font_rows(),
+                        target_pixel_width / float(raw_font_pixel_height) / options().font_rows());

that a division is made between
 target_pixel_width
and raw_font_pixel_height

if I understand correctly this expression the second line should be
target_pixel_width / float(raw_font_pixel_width) / options().font_collumns()

I don't know if  raw_font_pixel_width and font_collumns exist, i just put meaningful names

just an idea....

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7501
  • Last login:Yesterday at 05:38:56 pm
  • Quote me with care
Re: GroovyMAME 0.287 - Switchres 2.22b
« Reply #521 on: May 21, 2026, 12:51:55 pm »
Hi arc11,

Last year while I was searching for a workaround, I found odd in the lines :

    // determine the scale factor
-   float scale_factor = target_font_height() * scale / one_to_one_line_height;
+   float scale_factor = std::min(target_pixel_height / float(raw_font_pixel_height) / options().font_rows(),
+                        target_pixel_width / float(raw_font_pixel_height) / options().font_rows());

that a division is made between
 target_pixel_width
and raw_font_pixel_height

if I understand correctly this expression the second line should be
target_pixel_width / float(raw_font_pixel_width) / options().font_collumns()

I don't know if  raw_font_pixel_width and font_collumns exist, i just put meaningful names

just an idea....

Yes I understand why the code looks wrong. But it is right. There's no such thing as font pixel width (neither font columns). The only property that's defined for fonts is their pixel height.

The problem is this code in GroovyMAME is meant for integer scaling of bitmap fonts (.bdf fonts). Currently MAME defaults to a true type font that doesn't work so well when integer scaled, specially at extreme pixel aspects as the one you're using for the menu (768x240).

So probably I should make uismall.bdf the default in the provided mame.ini to avoid this problem in the future.

I took some time to replicate (sort of) your setup here, this is how GroovyMAME looks when -uifont uismall.bdf is used. The mode on screen is 768x240 (portrait / rotated).

Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

arc11

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:Yesterday at 09:59:50 am
  • I want to build my own arcade controls!
Re: GroovyMAME 0.287 - Switchres 2.22b
« Reply #522 on: Yesterday at 10:00:19 am »
Thanks for the reply

with this way of launching mame, the font is readable, but the menu is not as good as with the original mame code


Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7501
  • Last login:Yesterday at 05:38:56 pm
  • Quote me with care
Re: GroovyMAME 0.287 - Switchres 2.22b
« Reply #523 on: Yesterday at 04:58:02 pm »
Hi arc11,

The picture should look exactly like the one I posted (I configured my system with your resolution to do the test). If it doesn't, there must be something else broken with your configuration.

EDIT: Make sure to set font_rows 30 in ui.ini.
« Last Edit: Yesterday at 05:39:26 pm by Calamity »
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi