Apple II Core

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

Looking through the thread, there are still some issues to be resolved and feature requests. Here is a summary of everything remaining that I know of:

Editing this because a lot of it is done already...

  • We need a Reset button. I suggest F1 since it is near where the Reset button would be. We should be able to hit Control-Reset, and Control-Open Apple-Reset. Edit: I just checked and Reset is over on the right on a IIe, so maybe F11 makes more sense, or both for those that prefer the IIc feel.
  • Add an option in the core menu to "Require Control for Reset"
  • We need Open Apple and Closed Apple keys. This was previously mentioned and perhaps included into the code as Left Alt and Right Alt. US Keyboards don't have Right Alt. I suggest having the option for (Left Alt and Right Alt) or (Super/Windows key and Left Alt) for (Open Apple and Closed Apple).
  • Other key suggestions: F2 - 80/40 (this is a toggle switch on my Apple IIc, not sure about IIe), F3 - Keyboard (this is a toggle switch on my Apple IIc, not sure about IIe). I never use these, but thought I would mention them. Edit: I just checked and don't see these on the IIe, so probably just forget it.
  • The backspace should print a "Checkered Square" symbol, not act as the left arrow key. Or make this a configurable option in the core menu.
  • Shift 3 should print #. Earlier in the thread, someone mentioned the other pound symbol is sometimes desired also. In this case there should be an option for US and UK keyboards. Edit (more details): This was previously addressed by RedSkullDC. https://misterfpga.org/viewtopic.php?p=37568#p37568 This apparently has to do with the video ROM. It is suggested to be able to toggle the Video ROM file in the core menu.
  • Option to save mounted .DSK and other files as .NIB with the same prefix file name when writing occurs. Alternatively and perhaps better, option to convert the files as they are read in to .NIB and removing the original or moving it to a backup folder or .bak extension. I found this DSK2NIB program compiled by Newsdee earlier in the thread that could be used manually in the meantime: viewtopic.php?p=49611#p49611
  • Ability to read .PO files along with .HDV files for smartport harddrives. I think they are the same except the extension. This is not important.
  • Make 65C02 the default processor since it is more compatible. This affects Pitfall II, Copy2Plus, etc.
  • Reverse the left and right audio channels for the Mockingboard. Sorry, my bad. My MiSTer audio connections were backwards.
  • Add separate volume controls for the Mockingboard and the internal speaker. It would also be cool if there were keys for this like F5/F6, F7/F8 for down/up.
  • Add support for a second Mockingboard for Ultima V. The volume for this should be at the same level as the other Mockingboard.
  • Prevent the possibility to mount the same disk in both drives.
  • Add a 1.5x, 2x, 3x and 4x turbo option. Sometimes having faster speed is desirable (I'm looking at you Rampage!)
  • Add a No Slot Clock if one is not already there
  • Add extra RAM for use as a RAM disk and extra memory in Appleworks if it is not already there
  • Add a Super Serial Card if it is not already there. I am not sure how to interface this with the outside world, but I think it has been done with other cores.
  • Add Mouse support (Dazzle Draw). This alone would be huge because my Apple IIc ball mouse is, well, a ball mouse.
  • Very low priority, but add an Apple IIc and Apple IIc+ option to the core with the ability to replace the ROM with a ROM 4x / 5x chip.
virtuali
Posts: 124
Joined: Mon Feb 01, 2021 10:41 pm
Has thanked: 2 times
Been thanked: 37 times

Re: Apple II Core

Unread post by virtuali »

I'm having some issues with the latest version of the core, the one posted in the TEST.ZIP a few posts earlier. Is this supposed to support disk writes ?

If yes, I can't seem to make it work, I tested it with Ultima IV, both in .DSK and .NIB format, the game appears to save, but on a restart, the saved game is not updated. I must say I haven't tested other games so, is this possibly related to Ultima IV in particular ? Are there other ways to test if disk writes work ?

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

virtuali wrote: Wed Jul 05, 2023 11:29 pm

I'm having some issues with the latest version of the core, the one posted in the TEST.ZIP a few posts earlier. Is this supposed to support disk writes ?

If yes, I can't seem to make it work, I tested it with Ultima IV, both in .DSK and .NIB format, the game appears to save, but on a restart, the saved game is not updated. I must say I haven't tested other games so, is this possibly related to Ultima IV in particular ? Are there other ways to test if disk writes work ?

You don't need the test.zip, you need the .rbf file from here: viewtopic.php?p=74947#p74947

virtuali
Posts: 124
Joined: Mon Feb 01, 2021 10:41 pm
Has thanked: 2 times
Been thanked: 37 times

Re: Apple II Core

Unread post by virtuali »

My mistake, I didn't download the TEST.ZIP file, I used exactly the .RBF you linked, and it doesn't save. At least not with Ultima IV. I removed all my other Apple ii cores, to be sure I am running that one, of course.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

virtuali wrote: Thu Jul 06, 2023 12:45 am

My mistake, I didn't download the TEST.ZIP file, I used exactly the .RBF you linked, and it doesn't save. At least not with Ultima IV. I removed all my other Apple ii cores, to be sure I am running that one, of course.

I think you may need to go into the menu for it to permanently save it to the disk. I confirmed that it is working by saving a basic file to a .nib disk, hitting F12, then resetting the MiSTer, remounting the disk and seeing that my savefile was still there.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

I did more testing and Copy2Plus works great. One thing I did notice is that you can mount the same disk into both drives. I will add it to the list above.

Great work on the disk writing! This core is finally in a really good place. Hopefully the remaining issues can get resolved to make it even better. Sorry I keep adding to the list above. No rush on anything. Just want to throw the ideas out there as I think of them.

Stinky
Posts: 99
Joined: Mon Nov 15, 2021 9:05 pm
Has thanked: 62 times
Been thanked: 14 times

Re: Apple II Core

Unread post by Stinky »

alanswx wrote: Tue Jul 04, 2023 1:32 pm

I have some disk fixes to test..

Hey works great! Tested with some classics like Below The Root and Gemstone Warrior, needs to be nib of course.Does anyone have dsk2nib compiled for arm so we can run it directly on the mister?

User avatar
RealLarry
Top Contributor
Posts: 883
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 386 times

Re: Apple II Core

Unread post by RealLarry »

Stinky wrote: Thu Jul 06, 2023 8:46 am

Does anyone have dsk2nib compiled for arm so we can run it directly on the mister?

See attachment...just compiled on my RPi3/32bit. Not yet tested but should work.
Used source

Edit: Doesn't work. File deleted. Compiled with Debian Bookworm which binaries (currently) aren't compatible with MiSTer in general.

Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: Apple II Core

Unread post by Newsdee »

thorr wrote: Wed Jul 05, 2023 4:03 am
  • We need a Reset button.
  • Other key suggestions: F2 - 80/40 (this is a toggle switch on my Apple IIc, not sure about IIe), F3 - Keyboard (this is a toggle switch on my Apple IIc,

For these I'd prefer to use the same conventions as AppleWin - so it will be more seamless to use either the emulator or MiSTer:

  • Left Alt = Open Apple

  • Right Alt = Closed Apple

  • F2 = Reset

  • Ctrl + F2 = Ctrl+Reset

  • F9 = toggle through display mode (color, B&W, green, etc)

  • Shift+F9 = toggle backwards through display nodes

  • F10 = rocker switch to choose European Video ROM selection (I have one on my PAL Apple IIe)

  • Shift 3 should print #.

Yes that's due to the Video ROM embedded in the core.

  • Add extra RAM for use as a RAM disk and extra memory in Appleworks if it is not already there
  • Add a Super Serial Card if it is not already there. I am not sure how to interface this with the outside world, but I think it has been done with other cores.

Those are already there - Alan worked on the Super Serial Card already! :D

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

Thanks! Sounds great, except as mentioned, I have no Right Alt. I am not sure how AppleWin handles this for US Keyboards, but as long as there is a good way, I am happy with whatever that is for the sake of conventions. Also, I assume that Ctrl-Open Apple-Reset works too? I am not sure what "Reset" does by itself, but I don't think it does anything without the control key involved.
That's awesome that Super Serial Card and RAM is already there. Can I hook up a USB to serial adapter and have it work?

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: Apple II Core

Unread post by Newsdee »

thorr wrote: Thu Jul 06, 2023 5:22 pm

Thanks! Sounds great, except as mentioned, I have no Right Alt. I am not sure how AppleWin handles this for US Keyboards

What keyboard do you have? I've always had right alt on my US keyboards, but maybe its labeled something else in yours

For serial, its the same UART option as in ao486 ajd other cores. Not sure if yout USB adapter wil work but it is up to the Linux side to handle that.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Thu Jul 06, 2023 6:00 pm
thorr wrote: Thu Jul 06, 2023 5:22 pm

Thanks! Sounds great, except as mentioned, I have no Right Alt. I am not sure how AppleWin handles this for US Keyboards

What keyboard do you have? I've always had right alt on my US keyboards, but maybe its labeled something else in yours

For serial, its the same UART option as in ao486 ajd other cores. Not sure if yout USB adapter wil work but it is up to the Linux side to handle that.

Thanks! All US keyboards say "Alt" on both keys and they both send the same signal. Keyboards that have Right-Alt say "AltGr" on them. The MiSTer keyboard shortcuts that require Right Alt do not work for example. AppleWin might do keyboard scanning or something to see that you pressed the right Alt key, but the MiSTer doesn't do that. At least in my experience. Try this and press the Right Alt key. Both Alt's light up. https://www.keyboardtester.com/

User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Apple II Core

Unread post by thera34 »

thorr wrote: Thu Jul 06, 2023 5:22 pm

That's awesome that Super Serial Card and RAM is already there. Can I hook up a USB to serial adapter and have it work?

You may want to check this: https://mister-devel.github.io/MkDocs_M ... -apple-iie

Those two terminal programs seemed to work best/easy to use from what I've tried.

20230403_202442-screen.png
20230403_202442-screen.png (377.2 KiB) Viewed 10741 times
20230403_212331-screen.png
20230403_212331-screen.png (63.79 KiB) Viewed 10741 times
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

thera34 wrote: Thu Jul 06, 2023 7:28 pm
thorr wrote: Thu Jul 06, 2023 5:22 pm

That's awesome that Super Serial Card and RAM is already there. Can I hook up a USB to serial adapter and have it work?

You may want to check this: https://mister-devel.github.io/MkDocs_M ... -apple-iie

Those two terminal programs seemed to work best/easy to use from what I've tried.

Thanks! I will see if I can get it working. I have some programs I wrote that use the serial port and I am anxious to try those too. They are for the IIc though and it has some serial port issues that I had to work around. It will be interesting to see how it behaves on the IIe core.

Stinky
Posts: 99
Joined: Mon Nov 15, 2021 9:05 pm
Has thanked: 62 times
Been thanked: 14 times

Re: Apple II Core

Unread post by Stinky »

RealLarry wrote: Thu Jul 06, 2023 9:00 am
Stinky wrote: Thu Jul 06, 2023 8:46 am

Does anyone have dsk2nib compiled for arm so we can run it directly on the mister?

See attachment...just compiled on my RPi3/32bit. Not yet tested but should work.
Used source

Hey thanks for that, unfortunately it doesn't work due to a glibc mismatch.

User avatar
RealLarry
Top Contributor
Posts: 883
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 386 times

Re: Apple II Core

Unread post by RealLarry »

Stinky wrote: Thu Jul 06, 2023 10:20 pm
RealLarry wrote: Thu Jul 06, 2023 9:00 am
Stinky wrote: Thu Jul 06, 2023 8:46 am

Does anyone have dsk2nib compiled for arm so we can run it directly on the mister?

See attachment...just compiled on my RPi3/32bit. Not yet tested but should work.
Used source

Hey thanks for that, unfortunately it doesn't work due to a glibc mismatch.

Ha! I see... I did this on my RPi3 with the new "Bookworm" distribution which unfortunately isn't compatible anymore to MiSTer's OS with it's system libraries. Should keep my other RPi/SD with it's well hung Bullseye. Re-compiled and tested, working now.

Attachments
nibble.7z
(4.72 KiB) Downloaded 277 times
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 497 times
Been thanked: 467 times

Re: Apple II Core

Unread post by akeley »

I've tried saving in several text adventure game and they all work fine...so, combined with the other reports, it seems that the disk write problem has been finally put to rest. Many thanks to alanswx/gyurco and whoever else has contributed to solving this conundrum.

For me it was the biggest remaining thorn in MiSTer's side, which put a big damper on using this core. And now I also have an extra motivation to speed up work on the long-overdue update to my Apple II game collection ;)

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

virtuali
Posts: 124
Joined: Mon Feb 01, 2021 10:41 pm
Has thanked: 2 times
Been thanked: 37 times

Re: Apple II Core

Unread post by virtuali »

thorr wrote: Thu Jul 06, 2023 3:58 am

I think you may need to go into the menu for it to permanently save it to the disk. I confirmed that it is working by saving a basic file to a .nib disk, hitting F12, then resetting the MiSTer, remounting the disk and seeing that my savefile was still there.

I found the problem: the game was stored in a single ZIP file, containing multiple disk images, taking advantage of the Mister framework support for ZIP files to be seen as folders.

However, this seems to not be supported by this core (not sure if other cores supports it, if they need to write back to a disk image rather than saving to some cartridge RAM like the console cores usually do), because it would have to have a way to update the disk image back into the ZIP file, updating it. Maybe the framework doesn't support this transparently and it must be explicitly done in the individual cores ?

In any case, I tried placing the images in .NIB format in a regular folder outside the ZIP archive, and the save works, no need to open the main menu: I can see the timestamp of the .NIB file changes as soon as the game triggers a save.

However, it works only with .NIB images. .DSK images don't seem to support writing. Is anybody knowing which disk images supports writing in this version of the core ?

alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Apple II Core

Unread post by alanswx »

virtuali wrote: Fri Jul 07, 2023 2:20 pm
thorr wrote: Thu Jul 06, 2023 3:58 am

I think you may need to go into the menu for it to permanently save it to the disk. I confirmed that it is working by saving a basic file to a .nib disk, hitting F12, then resetting the MiSTer, remounting the disk and seeing that my savefile was still there.

I found the problem: the game was stored in a single ZIP file, containing multiple disk images, taking advantage of the Mister framework support for ZIP files to be seen as folders.

However, this seems to not be supported by this core (not sure if other cores supports it, if they need to write back to a disk image rather than saving to some cartridge RAM like the console cores usually do), because it would have to have a way to update the disk image back into the ZIP file, updating it. Maybe the framework doesn't support this transparently and it must be explicitly done in the individual cores ?

In any case, I tried placing the images in .NIB format in a regular folder outside the ZIP archive, and the save works, no need to open the main menu: I can see the timestamp of the .NIB file changes as soon as the game triggers a save.

However, it works only with .NIB images. .DSK images don't seem to support writing. Is anybody knowing which disk images supports writing in this version of the core ?

You can only write to .nib unless we update the mister main code.

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: Apple II Core

Unread post by Newsdee »

virtuali wrote: Fri Jul 07, 2023 2:20 pm

]
I found the problem: the game was stored in a single ZIP file, containing multiple disk images, taking advantage of the Mister framework support for ZIP files to be seen as folders.

However, this seems to not be supported by this core (not sure if other cores supports it, if they need to write back to a disk image rather than saving to some cartridge RAM like the console cores usually do), because it would have to have a way to update the disk image back into the ZIP file, updating it. Maybe the framework doesn't support this transparently and it must be explicitly done in the individual cores ?

Console cores save into a separate .sav file without touching the zip archive. So it's not a problem. There's a dedicated /media/fat/saves/ folder for them.

But computer cores (which update the floppy or hdd image file) cannot have the files inside a zip..

Personally I don't like the idea of modifying zip files as it can make it hard to track what changed (and if anything goes wrong, corrupt the file). So I'd say either make .dsk and .zip files read only, or convert them on the fly to a new .nib file written on disk. Alternatively, maybe .sav files can be used as an overlay (containing
nib format inside)

User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: Apple II Core

Unread post by Newsdee »

thorr wrote: Thu Jul 06, 2023 7:12 pm

[AppleWin might do keyboard scanning or something to see that you pressed the right Alt key, but the MiSTer doesn't do that. At least in my experience. Try this and press the Right Alt key. Both Alt's light up. https://www.keyboardtester.com/

So I just tested with my keyboard, and you're right; the MiSTer core is treating both Alt keys as Btn 1.
But I also see that Windows key is Btn 0... so both Open and Closed Apple are available :)

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

Awesome! Now we just need the Reset button. :-)

alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Apple II Core

Unread post by alanswx »

This version should fix this demo:
http://www.deater.net/weave/vmwprod/megademo/

Attachments
Apple-II.rbf
(3.4 MiB) Downloaded 232 times
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

Impressive!
Also, I double checked my stereo audio and my connections are backwards apparently. I tested with the SNES test suite. The mockingboard channels are correct.

agto1
Posts: 1
Joined: Sun Jul 09, 2023 5:27 am

Re: Apple II Core

Unread post by agto1 »

For disk copy or format in copyIIplus 5.5 and 8.4, errors occur.
When copying a disk using one disk drive or using two disk drives, errors occur in random multiple tracks. Not all tracks have error, but more tracks have them than have no error.
When formatting a disk, an error occurs in track 0 and stops.

Attachments
20230719_130841-screen-1.png
20230719_130841-screen-1.png (23.09 KiB) Viewed 9570 times
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Apple II Core

Unread post by alanswx »

This builld adds "F2" for a soft reset button (which is also on the mister hardware), an OSD to change the Video rom between US and Local (hardcoded to UK for local right now). Also defaults to 65C02 unless you had saved settings, in which case you will want to fix it and re-save your settings.

Attachments
Apple-II.rbf
(3.46 MiB) Downloaded 269 times
alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Apple II Core

Unread post by alanswx »

alanswx wrote: Sun Jul 09, 2023 10:54 pm

This builld adds "F2" for a soft reset button (which is also on the mister hardware), an OSD to change the Video rom between US and Local (hardcoded to UK for local right now). Also defaults to 65C02 unless you had saved settings, in which case you will want to fix it and re-save your settings.

I don't think the F2 works correctly. I will take another pass at fixing it later in the week.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Apple II Core

Unread post by thorr »

alanswx wrote: Sun Jul 09, 2023 10:54 pm

This builld adds "F2" for a soft reset button (which is also on the mister hardware), an OSD to change the Video rom between US and Local (hardcoded to UK for local right now). Also defaults to 65C02 unless you had saved settings, in which case you will want to fix it and re-save your settings.

Not sure how I missed this, but thanks so much! I can't wait to try it out with all the new goodies. I am hoping that the Reset key will work like the real one that requires control-reset, and control-open apple-reset. Control-reset stops the bootup or breaks you out of a program and gives you a prompt. Control-open apple-reset reboots.

ExCyber
Posts: 232
Joined: Sun May 24, 2020 3:33 pm
Has thanked: 12 times
Been thanked: 77 times

Re: Apple II Core

Unread post by ExCyber »

I think the Open/Closed Apple key reset functions are implemented in the ROM. I got them to work with the corresponding joystick buttons (no I/O board, and the emulated user button combo seems to override the individual keys), so I don't think there's anything to add to the core for that. The Control key interlock was hardware (which apparently could be bypassed, via a switch on the II+ and a jumper on the IIe), and I don't think it was ever implemented in the core.

alanswx
Core Developer
Posts: 300
Joined: Sun May 24, 2020 6:55 pm
Has thanked: 5 times
Been thanked: 154 times

Re: Apple II Core

Unread post by alanswx »

This version fixes the reset button (F2) and allows reboot and self-test. This also adds the option to load 8k video roms from here: https://downloads.reactivemicro.com/App ... Dual-Euro/

There is also a video rom option like the switch that was on non-US Apple IIe's so you can switch between US and UK mode (unless you load the French or German rom, and then it is between LOCAL and US mode)

Attachments
Apple-II.rbf
(3.6 MiB) Downloaded 203 times
Post Reply