Emularity / cffa question

56 views
Skip to first unread message

ern...@gmail.com

unread,
Jun 7, 2022, 4:18:11 PMJun 7
to
Howdy,

Being old, I still think screensavers are neat. A few years ago I saw the Apple II boot theater screensaver, thought it was cool, and made a small patch to make it work on Macs (old repo at https://github.com/esoffron/compatible-boot-theater -- no GitHub fire, please).

That was cool, but why not a real emulator as screensaver? I thought about doing a proper Mac binary repackaging some native emulator, and still might, but first want to do it with the Javascript emulator. Of course, I want to have it boot Total Replay into attract mode. I know that can work, because it does on Internet Archive.

I've nearly got it working except when I try to load in the hard disk image. 5.25 images run fine. I've got the CFFA 2 added, and can even boot a 5.25 disk of the CFFA config program in slot 6 to configure a CFFA in either slot 5 or 7 (or even both). If I try to mount a HD image of Total Replay (either .2meg or .hdv, both from IA), though, the VM hangs with

exception thrown: 105554440 loader.js:1053:53
Uncaught 105554440

The Ample emulator was a great help to figure out MAME syntax (THANK YOU), but I must still be botching something.

Here's the meat of how I try to load it. Can someone see what I'm doing wrong?

var emulator = new Emulator(document.querySelector("#canvas"),
null,
new JSMESSLoader(JSMESSLoader.driver("apple2ee"),
JSMESSLoader.nativeResolution(560, 384),
JSMESSLoader.scale(2),
JSMESSLoader.emulatorJS("emulators/jsmess/messnapple2e.js"),
JSMESSLoader.mountFile("apple2e.zip",
JSMESSLoader.fetchFile("Bios",
"examples/apple2e.zip")),
JSMESSLoader.mountFile("a2cffa2.zip",
JSMESSLoader.fetchFile("Bios",
"examples/a2cffa2.zip")),
JSMESSLoader.mountFile("TR.hdv",
JSMESSLoader.fetchFile("Game",
"examples/00playable.2meg")),
JSMESSLoader.mountFile("CFFA.UTIL.dsk",
JSMESSLoader.fetchFile("Game",
"examples/CFFA.UTIL.dsk")),
JSMESSLoader.mountFile("apple2e.cfg",
JSMESSLoader.fetchFile("Config",
"examples/apple2e.cfg")),
JSMESSLoader.peripheral("flop1", "CFFA.UTIL.dsk"),
// JSMESSLoader.extraArgs(["-sl7", "cffa2"]),
// JSMESSLoader.extraArgs(["-sl5", "cffa2"])
JSMESSLoader.extraArgs(["-sl7", "cffa2", "-hard1", "00playable.2meg"])
))
emulator.start({ waitAfterDownloading: true });

Thanks.

--Ernie

peter....@gmail.com

unread,
Jun 8, 2022, 11:48:04 AMJun 8
to
The "2meg" implies "2mg" format, which it isn't. It's an HDV, no 2mg header. Perhaps that's the issue?

peter....@gmail.com

unread,
Jun 8, 2022, 11:49:43 AMJun 8
to
Also, can you examine the size and contents of the downloaded TR file? Is it 32Mb large, and is not full of zeroes?

ern...@gmail.com

unread,
Jun 8, 2022, 12:51:24 PMJun 8
to
Thanks for looking at this!

I originally was just trying the HDV, downloaded from IA, and threw in the 2meg for testing because that's what it appeared the web emulator on IA was using.

I am able to boot both of those files (which are the same size, but md5 hash differently) in Ample (the Mac front end to MAME) on the same model emulated IIE enhanced and CFFA2, so I'm assuming Javascript MAME should be able boot at least one or the other. I might be using the wrong image file type, but I'm at least using known good files in the wrong format! ;)

In case it wasn't clear, it's the Javascript MAME that's crashing, not the booted Apple II. I don't end up in the monitor, or with a spinning unreadable Apple II drive... I get an error in the web browser console before the virtual machine starts to execute. This makes it (for me) very hard to debug, since I kind of know how to debug Javascript, and know how to debug a crashed Apple II, but the big strange enscripted MAME binary is a black hole to me.

My end goal is to replicate the Internet Archive experience, but without all the chrome around the window and using local source files. I tried to hit Jason Scott on Twitter, but he's too busy for stupid stuff like this.

--Ernie
Reply all
Reply to author
Forward
0 new messages