Although I have Macs running newer versions of OS X, my main Mac runs OS X 10.5.8, so I have a vested interest in maintaining LisaEm support.
Yup, similar situation here, my "mac" (short for machine) is an Acer Predator 17" running Ubuntu 18.04, but my goals for LisaEm are to have it be widely compatible. In that sense, I'd hate to not provide 10.4 support, but that may wind up being the case. 10.4 is interesting since it still supports OS9. At the same time, after a while wxWidgets will keep diverging and at some point (now-ish) I'll use features from wx3.x that will cause macos 10.4 support to end.
I guess I should also think about doing backups of these machines in some way that I can restore them without install media. Do you know if 10.5 and 10.4 have issues with Apple's cert expiring? I guess I can find a linux PPC boot CD and then dd a disk image out for now...
Now I'm adding features that I've wanted for a long time. I've added a few keyboard shortcuts, Command-I for insert disk, Command-R for Run (though I saw you eliminated this menu item), and Command-S for Power On (S for Start in this case).
Right, I eliminated "run" in favor of the power button and where Run was is now Pause as those menu items for run/pause were a bit annoying. It's a bit odd that the power button is on the keyboard menu, though technically that's correct since it shows up as a keyboard press to the COP421.
I also got rid of the "lame sound" where it wrote a temp file to disk, then played from that.
Great! wx3.x does seem to support playback from RAM instead of having to create a wave file in memory, write it to /tmp and then tell it to open it.
Actually I was very strongly considering moving to openal, though seeing that Catalina and Mojave dropped support for it made me hesitant, though actually I may add it in anyway and just rely on brew to install openal - or if that fails to just include it in the source code. After things settle down, I'll likely create a homebrew cask for it as well.
Next I'd like to modify LisaEm so that the Lisa is automatically powered on when I launch the application. I added a call to handle_powerbutton() in what I thought was a likely place, but this resulted in a hang and crash.
Could you show me what lines to add and where to have the Lisa start powered up?
I think the order of OnInit instantiation of LisaEmFrame vs LisaWin vs App is the issue there. 1.2.7 does have a command line option to power on start. Take a look at that code, though it does do some funny things like, after parsing the command line options, it sets some vars and once it's fully initialized it looks at those vars and does things like insert a floppy (and null out that var), turn on the Lisa (and null out that flag), go full screen, etc. So it's a way of getting around the chicken and egg by delaying startup behavior until things are instantiated.
The code isn't very clean C++ which is why you're running into issues, some of that is because I don't really that much about abstracting things the right way, some of it is because eventually I want to expose a C interface to the outside world for scripting, which is why you see both C and C++ code that do the same thing. That will get better in future releases, and will allow an external, say python or lua or some other thing to remotely control LisaEm and do interesting things. But it's still a mess currently.
I really had a great design with 1.3.0 but I couldn't get the emulator guts working properly. It's too bad. That code splits up the emulation core from the UI very nicely and there's not so many hooks between them... And it could have potentially allowed me to move away from wx to say qt or something entirely different.
I don't want to discourage you. Ideally, I'd like to have the same source code everywhere and not have different behavior/menus. But I do appreciate and welcome the help.