[SOLVED] Macintosh SE emulation using lr-mame (GNU/Linux)

Hi there,

Latest stable standalone MAME 0.263 has perfect Mac SE emulation support, which I can easily run with: mame macse -hard1 system608.hdv …where system608.hdv is my own hard disk image with my Macintosh programs and games on it.

But I am having major trouble replicating this with lr-mame. I have so far created a macse directory containing both the Mac SE boot roms zip and the hard disk image, like this:

macse/macse.zip
macse/system608.hdv

Then I try to launch Mac SE emulation using lr-mame like this:

retroarch -L mame_libretro.so macse

…But I get the MAME menu instead of the Mac SE emulation being started. I get this on the TTY console:

root@debian:~/mac128# retroarch -L mame_libretro.so macse -v
[INFO] [Config]: Looking for config in: "/root/.config/retroarch/retroarch.cfg".
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) N100
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.17.0
[INFO] Built: Mar  9 2024
[INFO] =================================================
[INFO] [Input]: Found input driver: "udev".
[INFO] [Core]: Loading dynamic libretro core from: "mame_libretro.so"
[INFO] [Overrides]: Core-specific overrides found at "/root/.config/retroarch/config/MAME/MAME.cfg".
[INFO] [Config]: Loading config: "/root/.config/retroarch/retroarch.cfg".
[INFO] [Config]: Appending override config: "/root/.config/retroarch/config/MAME/MAME.cfg".
[INFO] [Overrides]: Redirecting save file to "/root/.config/retroarch/saves/MAME.srm".
[INFO] [Overrides]: Redirecting save state to "/root/.config/retroarch/states/MAME.state".
[INFO] [Environ]: GET_CORE_OPTIONS_VERSION.
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL.
[INFO] [Environ]: SET_CONTROLLER_INFO.
[INFO] [Environ]: SET_SUPPORT_NO_GAME: yes.
[INFO] [Environ]: GET_LED_INTERFACE.
[INFO] [Environ]: GET_LOG_INTERFACE.
[INFO] [Environ]: SYSTEM_DIRECTORY: "/root/.config/retroarch/system".
[INFO] [Environ]: CORE_ASSETS_DIRECTORY: "/root/.config/retroarch/downloads".
[INFO] [Environ]: SAVE_DIRECTORY: "/root/.config/retroarch/saves".
[INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_KEYBOARD_CALLBACK.
[libretro INFO] ------------------------
[libretro INFO] MAME 0.263 (unknown)
[libretro INFO] ------------------------
[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[libretro ERROR] Error parsing game path: "macse"
[libretro ERROR] Error parsing system name: "macse"
[libretro ERROR] Error parsing parent path: "macse"
[libretro INFO] Starting game: "macse"
[libretro INFO] Game name: macse
[libretro INFO] Game description: Macintosh SE
[libretro INFO] Game name: macse
[libretro INFO] Game description: Macintosh SE
[INFO] [Environ]: SET_ROTATION: 0
[INFO] [Replay]: Found last replay slot: #0
[INFO] [SRAM]: Skipping SRAM load.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Core]: Geometry: 640x480, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz.
[INFO] [Audio]: Set audio input rate to: 48001.92 Hz.
[INFO] [Video]: Set video size to: fullscreen.
[INFO] [Wayland]: fractional_scale_v1 enabled
[INFO] [Vulkan]: Vulkan dynamic library loaded.
[INFO] [Vulkan]: Found vulkan context: "vk_wayland".
[INFO] [Vulkan]: Detecting screen resolution: 1920x1080.
[INFO] [Vulkan]: Found GPU at index 0: "Intel(R) Graphics (ADL-N)".
[INFO] [Vulkan]: Using GPU index 0.
[INFO] [Vulkan]: Using semaphores for WSI acquire.
[INFO] [Vulkan]: Using GPU: "Intel(R) Graphics (ADL-N)".
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
[INFO] [Vulkan]: Got 3 swapchain images.
[INFO] [Wayland] Failed to specify monitor for fullscreen, letting compositor decide
[INFO] [Vulkan]: Using resolution 1920x1080.
[INFO] [Vulkan]: Using BGRA8888 format.
[INFO] [Shaders]: Specific shader preset found at "/root/.config/retroarch/config/global.slangp".
[INFO] [slang]: Compiling shader: "/root/.config/retroarch/shaders/crt/shaders/fakelottes.slang".
[INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #0.
[INFO] [Vulkan filter chain]: Creating framebuffer 1440x1080 (max 1 level(s)).
[INFO] [udev]: Pad #0 (/dev/input/event17) supports 0 force feedback effects.
[INFO] [Autoconf]: Arduino LLC Arduino Leonardo (9025/32822) not configured.
[INFO] [udev]: Pad #1 (/dev/input/event18) supports 0 force feedback effects.
[INFO] [Autoconf]: Arduino LLC Arduino Leonardo (9025/32822) not configured.
[INFO] [udev]: Pad #2 (/dev/input/event19) supports 0 force feedback effects.
[INFO] [Autoconf]: Arduino LLC Arduino Leonardo (9025/32822) not configured.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Wayland]: Enabling idle inhibitor
[INFO] [Video]: Found display server: "null".
[INFO] [ALSA] Using ALSA version 1.2.8
[INFO] [ALSA]: Using S16_LE sample format for PLAYBACK device "default"
[INFO] [ALSA]: Period: 4 periods per buffer (384 frames, 1536 bytes)
[INFO] [ALSA]: Buffer size: 1536 frames (6144 bytes)
[INFO] [ALSA]: Can pause: yes.
[INFO] [ALSA]: Initialized PLAYBACK device "default"
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [Display]: Found display driver: "vulkan".
[INFO] [Playlist]: Loading history file: "/root/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/root/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/root/.config/retroarch/content_favorites.lpl".
[INFO] [Vulkan filter chain]: Creating framebuffer 1440x1080 (max 1 level(s)).
[INFO] [Environ]: SET_GEOMETRY.

I see no missing roms, no errors, nothing. So, please, how can I get Mac SE emulation going in lr-mame?

You mean the MAME OSD comes up? In that case, you should be able to enter the name of the system and then at least start it empty, then navigate to whatever you want to load it with. This is how it works for me in Windows, I try to do everything from the gui, but I haven’t fiddled around with the core for a long time.

In my case, it would crash at first though, I had to go to an old RA installation and used a slightly older MAME (0.249) which would give me a message about the missing roms in the OSD :man_shrugging:

Your command line is incomplete. I am AFKB but will chime in later, after I test the machine

Yes, please! :slight_smile:

1 Like

So… I used a *.cmd as a rom and loaded in in the mame core. I didn’t have a System 4 HDD image so I used a System 6.08.

My command file reads…

macsefd -ramsize 4M -rompath "E:\Temp\macsefd" -hard "E:\Temp\macsefd\mac608.chd"

Essentially you need to add the path to the HDD image (Not sure if the -rompath switch is needed anymore… I have had mixed results.)

I chose the Macintosh SE FDHD to have access to a larger library of floppy images. I have yet to try to install any software on this machine. As far as 68K macs in MAME go, I have put most of my time into the Macintosh LC III.

In any case this should get you up and running.

I haven’t done a graphic for this yet but will add it to my todo list. :grin:

@Duimon I am on GNU/Linux, not on Windows, so I am trying to do:

retroarch -L mame_libretro.so "macse -ramsize 4M -rompath ./roms -hard ./system608.hfv"

…But I get:

[libretro INFO] ------------------------
[libretro INFO] MAME 0.263 (unknown)
[libretro INFO] ------------------------
[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[libretro INFO] Starting game from command line: "macse -ramsize 4M -rompath ./roms -hard ./system608.hfv"
[libretro INFO] Game name: macse
[libretro INFO] Game description: Macintosh SE
[INFO] [Environ]: SET_ROTATION: 0
[libretro ERROR] macse.rom NOT FOUND (tried in macse)
342s0440-b.bin NOT FOUND (tried in adbmodem macse)
[libretro ERROR] Fatal error: Required files are missing, the machine cannot be run.
[ERROR] [Content]: Failed to load content

The macse roms (macse.zip) is indeed in ./roms, so I don’t know what else to try…

1 Like

Normally I use standard Software List method as a rule, even if I’m not using them. (Hence my use of the “macse” folder as rompath.)

I just verified that it isn’t necessary here.

Looking at the error… it can’t find the MAME rom “macse.zip”. (Both files it references are in that ZIP.) Verify that you have that file in the rompath.

The “macse.zip” can be found in the MAME romset. Otherwise I think you should be good to go.

I am a little concerned that you are using two relative paths, but we’ll see what happens.

Also verify that you have software lists DISABLED in the mame opt. That is another good reason to use the macse folder… you can use a “macse.opt”.

macse.opt

mame_alternate_renderer = "enabled"
mame_altres = "640x480"
mame_auto_save = "disabled"
mame_autoloadfastforward = "disabled"
mame_boot_from_cli = "enabled"
mame_boot_to_bios = "disabled"
mame_boot_to_osd = "disabled"
mame_buttons_profiles = "enabled"
mame_cheats_enable = "disabled"
mame_cpu_overclock = "default"
mame_joystick_deadzone = "0.15"
mame_joystick_saturation = "0.85"
mame_joystick_threshold = "0.30"
mame_lightgun_mode = "none"
mame_lightgun_offscreen_mode = "free"
mame_mame_4way_enable = "disabled"
mame_mame_paths_enable = "disabled"
mame_media_type = "rom"
mame_read_config = "enabled"
mame_rotation_mode = "libretro"
mame_saves = "game"
mame_mouse_enable = "enabled"
mame_softlists_auto_media = "disabled"
mame_softlists_enable = "disabled"
mame_thread_mode = "enabled"
mame_throttle = "disabled"
mame_write_config = "enabled"

The most important lines being…

mame_mouse_enable = "enabled"
mame_softlists_auto_media = "disabled"
mame_softlists_enable = "disabled"

BTW. I am fairly certain you could use a *.sh as content on linux.

I have these on mame.opt now:

mame_alternate_renderer = "disabled"                                                                                                             
mame_altres = "640x480"                                                                                                                          
mame_auto_save = "disabled"                                                                                                                      
mame_autoloadfastforward = "disabled"                                                                                                            
mame_boot_to_bios = "enabled"                                                                                                                    
mame_boot_to_osd = "disabled"                                                                                                                    
mame_buttons_profiles = "disabled"                                                                                                               
mame_cheats_enable = "disabled"                                                                                                                  
mame_cpu_overclock = "default"                                                                                                                   
mame_joystick_deadzone = "0.15"                                                                                                                  
mame_joystick_saturation = "0.85"                                                                                                                
mame_joystick_threshold = "0.30"                                                                                                                 
mame_lightgun_mode = "lightgun"                                                                                                                  
mame_lightgun_offscreen_mode = "free"                                                                                                            
mame_mame_4way_enable = "disabled"                                                                                                               
mame_mame_paths_enable = "disabled"                                                                                                              
mame_media_type = "rom"                                                                                                                          
mame_mouse_enable = "enabled"                                                                                                                    
mame_read_config = "disabled"                                                                                                                    
mame_rotation_mode = "libretro"                                                                                                                  
mame_saves = "game"                                                                                                                              
mame_softlists_auto_media = "disabled"                                                                                                           
mame_softlists_enable = "disabled"                                                                                                               
mame_thread_mode = "enabled"                                                                                                                     
mame_throttle = "disabled"                                                                                                                       
mame_write_config = "disabled"     

And I have this on mac.sh:

macse -rompath "/root/mac128" -hard "/root/mac128/mac608.chd"  

Then if I do this:

retroarch -v -L mame_libretro.so mac.sh

…I get to the MAME internal menu, and after selecting the Mac SE, the machine finally boots the Mac SE ROM, but it doesn’t boot to the CHD installed system. I have used absolute paths just in case…

This is the relevant part in the RetroArch log:

[libretro INFO] ------------------------
[libretro INFO] MAME 0.263 (unknown)
[libretro INFO] ------------------------
[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[libretro ERROR] Error parsing system name: "mac.sh"
[libretro ERROR] Error parsing parent path: "mac.sh"
[libretro INFO] Starting game: "mac.sh"
[libretro ERROR] Driver not found: mac
[libretro ERROR] System not found: mac.sh

I understad this means that mac.sh isn’t being correctly interpreted as a content on Linux. Then, how can I pass a commandline as a content on Linux? Is it even possible?

As I said, the Mac SE emulation at least boots now, but it doesn’t load the .chd file… Almost there! Do you know what could be happening?

1 Like

Try renaming the *.sh to *.cmd. It isn’t actually being executed by the shell so it’s worth a try. I wish I had a Linux install to test on to make things easier.

Ok, I renamed mac.sh to mac.cmd, and now, RetroArch seems to be parsing it, but complains about missing roms again.

This is what mac.cmd has:

macsefd -rompath "/root/mac128/roms" -hard "/root/mac128/mac608.chd

This is what RetroArch tells me now:
[libretro INFO] ------------------------
[libretro INFO] MAME 0.263 (unknown)
[libretro INFO] ------------------------
[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[libretro ERROR] Error parsing system name: "mac.cmd"
[libretro ERROR] Error parsing parent path: "mac.cmd"
[libretro INFO] Starting game from cmd: "macsefd -rompath "/root/mac128/roms" -hard "/root/mac128/mac608.chd""
[libretro INFO] Game name: macsefd
[libretro INFO] Game description: Macintosh SE (FDHD)

…But I get a “sad mac” error inside the emulation, number:

00000000F 00000000A

Almost there… but not quite there yet.

There’s also a very loud popping noise if I launch the emulation this way… that doesn’t happen if I start it from the MAME menu instead.

I have also tried without -hard, but same problem occurs.

1 Like

Perhaps you could increase your “Cor Logging Level” to “Debug” in the Retroarch settings and it could give us some more info.

I get the same errors as you.

[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[libretro ERROR] Error parsing system name: "macsefd.cmd"
[libretro ERROR] Error parsing parent path: "macsefd.cmd"
[libretro DEBUG] Path extraction result: File name = "macsefd.cmd"
[libretro DEBUG] Path extraction result: Game name = "macsefd"
[libretro DEBUG] Path extraction result: System name = "macsefd.cmd"
[libretro DEBUG] Path extraction result: Game path = "."
[libretro DEBUG] Path extraction result: Parent path = "macsefd.cmd"
[libretro INFO] Starting game from cmd: "macsefd -ramsize 4M -rompath "E:\Temp\macsefd" -hard "E:\Temp\mac608.chd""
[libretro DEBUG] Searching for driver: macsefd
[libretro DEBUG] System type: ARCADE
[libretro INFO] Game name: macsefd
[libretro INFO] Game description: Macintosh SE (FDHD)

…but my HDD image runs without issues.

Did I notice correctly that you have switched your HDD image to the MAME Software List 608 CHD?

BTW. If I run the content from a “macsefd” rompath the errors go away. I seems MAME is happier using standard methods, even with Softlists disabled.

[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[libretro DEBUG] Path extraction result: File name = "E:\Temp\macsefd\macsefd.cmd"
[libretro DEBUG] Path extraction result: Game name = "macsefd"
[libretro DEBUG] Path extraction result: System name = "macsefd"
[libretro DEBUG] Path extraction result: Game path = "E:\Temp\macsefd"
[libretro DEBUG] Path extraction result: Parent path = "E:\Temp"
[libretro INFO] Starting game from cmd: "macsefd -ramsize 4M -rompath "E:\Temp\macsefd" -hard "E:\Temp\mac608.chd""
[libretro DEBUG] Searching for driver: macsefd
[libretro DEBUG] System type: ARCADE
[libretro INFO] Game name: macsefd
[libretro INFO] Game description: Macintosh SE (FDHD)

In an aside…

The reason I concentrate my R&D on the LCIII is that it has a cdrom drive. I install imaging tools and I can mount floppy images etc. that I get into the system via creating ISOs and mounting them with the MAME file manager.

The LCIII is in the 68K family, can run a newer OS version, and can play all the old games. (Sometimes you have to change the display properties.)

Notice the imaging tool aliases and the mounted cdrom.

Another aside. Here is a link to the MAMEDEV 68K Wiki page.

We did it, Duimon!!!

The problems I was having were due to me having Latency->Runahead active, it seems that MAME Mac emulation has major problems with it. As soon as I disabled it, things finally worked.

First, I moved everything (the Macse ROMs and the hard disk image) to the macse directory, as in:

~/mac128/macse/macse.zip
~/mac128/macse/adbmodem.zip
~/mac128/macse/system608.hdv

This is my macse.cmd, that lives in ~/mac128/macse.cmd:

macse -rompath macse -hard macse/system608.hdv

This is how I launch it all:

retroarch -L mame_libretro.so macse.cmd

Good times ahead emulating all kind of legacy Mac hardware using MAME + RetroArch! Thanks A LOT for accompanying me on this MAME+RetroArch Mac emulation experiment, what I learned from you is very important to me, I have taken good notes of everything. Thanks really!

Yay!!! :partying_face:

You are welcome really!

I am glad my insistence on managing to run every MAME system I do a graphic for has paid off.

A bit of advice. Make a copy of your mame.opt and name it macse.opt. There are many MAME Software List machines that really need softlists enabled so I use that in my default mame.opt.

Good luck and have fun! :grin:

In fact, having softlists enabled doesn’t make any difference in my case: macse emulation works the same with them enabled. So I will leave them enabled for future systems supported by the MAME core, which could need them.

1 Like

@Duimon Have you tried booting a macii or maciici? I’m seeing erratic mouse pointer movement with those systems. The maclc3 (which I believe you use because of the CD-ROM support) does not show that problem.

I’m asking you because you are the only person I know emulating computers with the MAME core, and maybe we should report this possible bug.

Well, since the mouse cursor problem seems to come from upstream MAME (tested MAME standalone on different OS, libs and hardware configurations) I have reported it on the upstream MAME github:

1 Like

The Batocera Linux project uses MAME for all sorts of classic systems. You may be able to get some answers from them in the future. They have a Discord.

I have worked fairly close with Lbrpdx, TVslan, and Modhack. They are a good bunch of people.