Discussion:
An emu-related idea I'm thinking of attempting...
(too old to reply)
Steve Nickolas
2020-06-13 21:07:02 UTC
Permalink
When I learned what UEFI supported, I got a really stupid idea, but in
order to carry it out, I'll need to start simple first and move up to more
complex. Might need a hand - my familiarity with ProDOS is limited and OS
stuff isn't exactly in my wheelhouse.

The simpler thing I need to do is create a set of functions to implement
the ProDOS-8 API in "native space", taking advantage of the fact that I
can have my 65C02 emulators implement LC card-like "COPcodes" to handle
calls to native functions. This would involve writing the "libprodos" as
well as a "wedge rom" which will allow the necessary initialization to be
done at startup, again through a COPcode (and it'll also allow a PR#7 to
do the same). Right now this is the route I'd like to take.

(As far as regards translating filenames: I plan to use the CiderPress
protocol.)

-uso.
Steve Nickolas
2020-06-14 00:40:33 UTC
Permalink
I'm debating.

I could do this the easy way or the hard way. The easy way would be to
add an 8-byte header to each file containing a magic number (the hex
values 56 44 4F 53 1A, followed by the type and auxtype), and add a .VD8
extension.

The hard way would be to use the CiderPress system. While doable, that's
a lot more work to code and pretty brutal to implement.

-uso.
Steve Nickolas
2020-06-18 06:00:13 UTC
Permalink
https://6.buric.co/capple-vdos002.zip

This is a proof of context. It's still very broken, and I plan to replace
the actual Apple ][ emulation bits with a cut-down version of modapple
once it's up and running.

What I ended up doing was making it check for an 8-byte header (the string
"VDOS", followed by 0x1A, one byte for type, and two bytes (little-endian)
for subtype). Basic stuff works, but a lot of stuff borks or crashes.

-uso.
Steve Nickolas
2020-06-18 23:40:19 UTC
Permalink
Here's a second proof of concept.

https://6.buric.co/provem-001.zip

Works about the same way as the first, except now it emulates a 128K Apple
//e with full graphics support (the actual sound and graphics support
isn't that great though).

Some stuff works fine, but other stuff really doesn't. For example when I
run the MECC launcher, I get this message:

You are about to DESTROY the contents of the /’’’’’’’ volume.
Do you want to continue? [Yes] No

If you select No it does an exit call. If you select Yes it attempts to
load the DOS 3.3 emulator but fails. Also, there's very obvious bugs in
directory handling (do a CAT or CATALOG).

-uso.
Kent Dickey
2020-06-19 16:51:51 UTC
Permalink
-=-=-=-=-=-
Here's a second proof of concept.
https://6.buric.co/provem-001.zip
Works about the same way as the first, except now it emulates a 128K Apple
//e with full graphics support (the actual sound and graphics support
isn't that great though).
I was hoping someone else would ask since I'm not able to follow what you're
trying to do. Can you summarize it?

I downloaded this .zip, and it looks like a Windows executable for an
Apple //e emulator. What is this a proof-of-concept of? From the first
post, I got the impression you were trying to make an emulator a UEFI
executable, so it would boot like another OS on your PC (you could select
Windows, Linux, or Apple //e from UEFI, like it was a native OS).
But this looks like an emulator that runs under Windows, using SDL to do
graphics, sound, etc. But looking at the code, it seems like you're
trying to abstract out ProDOS using vdos.c. Is your plan to support
ProDOS and leave the language card free by having the emulator do all the
ProDOS work, and so only need to reserve the $BF00 page to get full
ProDOS support?

Kent
Steve Nickolas
2020-06-20 06:15:33 UTC
Permalink
Post by Kent Dickey
I was hoping someone else would ask since I'm not able to follow what you're
trying to do. Can you summarize it?
I downloaded this .zip, and it looks like a Windows executable for an
Apple //e emulator. What is this a proof-of-concept of? From the first
post, I got the impression you were trying to make an emulator a UEFI
executable, so it would boot like another OS on your PC (you could select
Windows, Linux, or Apple //e from UEFI, like it was a native OS).
But this looks like an emulator that runs under Windows, using SDL to do
graphics, sound, etc. But looking at the code, it seems like you're
trying to abstract out ProDOS using vdos.c. Is your plan to support
ProDOS and leave the language card free by having the emulator do all the
ProDOS work, and so only need to reserve the $BF00 page to get full
ProDOS support?
That's part of it.

The idea is to implement ProDOS in the emulator, and use a folder instead
of a disk image.

It...kinda works. There's a bit of weirdness, some of which I can't
figure out yet, but it does sort-of work.

-uso.
Steve Nickolas
2020-06-24 23:56:37 UTC
Permalink
I've gotten a rough implementation of an Apple //e emulator on top of
UEFI. No file or disk access yet, speed control is sloppy and there's
some missing key support, but it DOES work.

https://6.buric.co/efidap000.zip

Testing in VirtualBox in UEFI mode, it will boot directly into the
emulator and straight to the FPBASIC prompt.

-uso.
eeastman
2020-06-25 13:41:40 UTC
Permalink
Post by Steve Nickolas
https://6.buric.co/efidap000.zip
Testing in VirtualBox in UEFI mode, it will boot directly into the
emulator and straight to the FPBASIC prompt.
So it boots an emulator from a PC disk image, sans OS overhead?

Downloaded the file, now trying to figure out Oracle VM VirtualBox 6.1. :) Let me know if I have the wrong VM software.

-Ed
Steve Nickolas
2020-06-25 17:01:16 UTC
Permalink
Post by eeastman
Post by Steve Nickolas
https://6.buric.co/efidap000.zip
Testing in VirtualBox in UEFI mode, it will boot directly into the
emulator and straight to the FPBASIC prompt.
So it boots an emulator from a PC disk image, sans OS overhead?
Downloaded the file, now trying to figure out Oracle VM VirtualBox 6.1.
:) Let me know if I have the wrong VM software.
I use 6.0.14 so you should be fine.

Just make sure under "Settings/System" you have EFI enabled.

I haven't yet figured out if there's a better way to read the keyboard so
I can get the Alt keys and Ctrl-Break or Ctrl-F12 (these are kind-of
important). Sound is probably going to be about impossible, too. And I
don't know how I'm going to handle disks. But yeah - this boots direct
into the Apple //e emulator without loading an OS.

-uso.
awanderin
2020-06-25 18:51:26 UTC
Permalink
Post by Steve Nickolas
Post by eeastman
Post by Steve Nickolas
https://6.buric.co/efidap000.zip
Testing in VirtualBox in UEFI mode, it will boot directly into the
emulator and straight to the FPBASIC prompt.
So it boots an emulator from a PC disk image, sans OS overhead?
Downloaded the file, now trying to figure out Oracle VM VirtualBox
6.1. :) Let me know if I have the wrong VM software.
I use 6.0.14 so you should be fine.
Just make sure under "Settings/System" you have EFI enabled.
I haven't yet figured out if there's a better way to read the keyboard
so I can get the Alt keys and Ctrl-Break or Ctrl-F12 (these are
kind-of important). Sound is probably going to be about impossible,
too. And I don't know how I'm going to handle disks. But yeah - this
boots direct into the Apple //e emulator without loading an OS.
I'm using VirtualBox 6.1 (on Linux) and it just dumps me into the UEFI
Interactive Shell.

I've set the optical drive to the efidap.iso file. Is the efidap.efi
file needed as well? Did you configure your VM in any other ways other
than enabling EFI?
--
--
Jerry awanderin at gmail dot com
Steve Nickolas
2020-06-25 22:15:31 UTC
Permalink
Post by awanderin
Post by Steve Nickolas
Post by eeastman
Post by Steve Nickolas
https://6.buric.co/efidap000.zip
Testing in VirtualBox in UEFI mode, it will boot directly into the
emulator and straight to the FPBASIC prompt.
So it boots an emulator from a PC disk image, sans OS overhead?
Downloaded the file, now trying to figure out Oracle VM VirtualBox
6.1. :) Let me know if I have the wrong VM software.
I use 6.0.14 so you should be fine.
Just make sure under "Settings/System" you have EFI enabled.
I haven't yet figured out if there's a better way to read the keyboard
so I can get the Alt keys and Ctrl-Break or Ctrl-F12 (these are
kind-of important). Sound is probably going to be about impossible,
too. And I don't know how I'm going to handle disks. But yeah - this
boots direct into the Apple //e emulator without loading an OS.
I'm using VirtualBox 6.1 (on Linux) and it just dumps me into the UEFI
Interactive Shell.
I've set the optical drive to the efidap.iso file. Is the efidap.efi
file needed as well? Did you configure your VM in any other ways other
than enabling EFI?
The efidap.efi file is on the iso in efi/boot/bootx64.efi, I think.

https://6.buric.co/efidap1.webm

The only other change I made was to use "other" as the OS type. Anyway,
might this work (the EFI shell in VBox has tab completion):

Shell>fs0:
FS0:\>cd efi\boot
FS0:\EFI\BOOT>bootx64.efi

Pretty sure everything else is set to default, and no hard drive is
configured for the VM.

-uso.
awanderin
2020-06-26 05:05:50 UTC
Permalink
Post by Steve Nickolas
Post by awanderin
Post by Steve Nickolas
Post by eeastman
Post by Steve Nickolas
https://6.buric.co/efidap000.zip
Testing in VirtualBox in UEFI mode, it will boot directly into the
emulator and straight to the FPBASIC prompt.
So it boots an emulator from a PC disk image, sans OS overhead?
Downloaded the file, now trying to figure out Oracle VM VirtualBox
6.1. :) Let me know if I have the wrong VM software.
I use 6.0.14 so you should be fine.
Just make sure under "Settings/System" you have EFI enabled.
I haven't yet figured out if there's a better way to read the keyboard
so I can get the Alt keys and Ctrl-Break or Ctrl-F12 (these are
kind-of important). Sound is probably going to be about impossible,
too. And I don't know how I'm going to handle disks. But yeah - this
boots direct into the Apple //e emulator without loading an OS.
I'm using VirtualBox 6.1 (on Linux) and it just dumps me into the UEFI
Interactive Shell.
I've set the optical drive to the efidap.iso file. Is the efidap.efi
file needed as well? Did you configure your VM in any other ways other
than enabling EFI?
The efidap.efi file is on the iso in efi/boot/bootx64.efi, I think.
https://6.buric.co/efidap1.webm
The only other change I made was to use "other" as the OS type.
FS0:\>cd efi\boot
FS0:\EFI\BOOT>bootx64.efi
Pretty sure everything else is set to default, and no hard drive is
configured for the VM.
It just drops me into the shell and there is no "fs0:" to be had.

It says:
'fs0:' is not a valid mapping.

I can mount the ISO image just fine with:
sudo mount -o loop,ro efidap.iso /media
so the ISO seems fine.


My settings are:
General:
Name: EFI DAP
Type: Other
Version: Other/Unknown (64-bit) [I've tried DOS and Other/Unknown]
System:
Memory: 1GB [tried 64MB, the default]
Boot order: Optical is first, all others are disabled
Chipset: PIIX3
Extended Features: Enable EFI checked
Storage:
IDE: efidap.iso
type: PIIX4
Use Host I/O Cache checked (default)

Don't see any other settings that might have any effect.

Oh well, it was worth the try.
--
--
Jerry awanderin at gmail dot com
Steve Nickolas
2020-10-24 16:35:39 UTC
Permalink
So I think I've managed to get this working; it now boots (for me at
least) both in QEMU and Virtual Box. I had to create a FAT12 image with
the boot file, *and* a copy of the tree in the iso. Just bashing and
bashing until something worked. It's the same binary as before.

http://6.buric.co/efidap000.iso.gz

In the iso is a floppy disk image, and the same tree exploded.

The command I used to generate it after making the two filesystems was:

xorriso -as mkisofs -o /frankie/c/efidap.iso -b efidap.144 efidap.iso

This works for me either using Virtual Box (6.1.14) or QEMU (3.1.0).

qemu -accel kvm -bios /usr/share/ovmf/OVMF.fd -cdrom
/frankie/c/efidap.iso

Beyond that... I'm still stuck for figuring out how to handle anything
further using UEFI. Until I can read the alt keys and Ctrl-Break /
Ctrl-Alt-Break there's not much more I think I can do. I also need to
figure out how to do stuff with sound (I think UEFI doesn't have drivers
for this, so I may need to leave it out) and files (I'd *like* to try to
figure out why my ProDOS emulation is broken, but disk images are also a
possibility).

What I actually wanted to be able to do was make a "transparent", nearly
bare-metal Apple //e emulation. I've failed, but not entirely.

-uso.

Loading...