Apple II Core

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 »

Great work with the disk write!

It's possible to convert .DSK to .NIB using this utility:

https://github.com/slotek/dsk2nib

It must be compiled from source, but it's extremely easy to do, since it's a single .C file with no strange dependencies. I did it in Windows under Linux/Ubuntu terminal mode, but I guess it could be done directly from Mister, although it will likely be slower.

Download the dsk2nib project from Github, open the linux console and compile it this way:

Code: Select all

make all -f Makefile.txt
This assuming you have gcc and make installed. If not, just apt-get install gcc and apt-get install make. On my Windows Linux subsystem, I had to do an apt-get update first, to get all updated repositories.

If the compilation went well, you should have the dsk2nib executable ready. Be sure it's marked executable ( it not, do a chmod +x dsk2nib ), then you can do a batch conversion. Assuming you have a bunch of *.dsk files in the same folder you compiled the utility, this line will convert them all to .nib:

Code: Select all

for f in *.dsk; do ./dsk2nib "$f" "$(basename "$f" .dsk).nib"; done
AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Apple II Core

Unread post by AmintaMister »

Newsdee wrote: Sun Apr 17, 2022 12:40 am Here is a test build by alanswx that I've been testing recently,
adding a second floppy drive and the ability to save disks in .nib format to the SD card!

I was able to play Adventure Construction Set and Ultima II with it so far.

It needs disks to be in .nib to write back to them. This is an acceptable trade-off since this is not a copy-protected format anyway; and it also helps keep your files tidy on your SD card e.g. all saves in a separate folder. I would also recommend preparing save disks in AppleWin first since it formats and copies data much faster than MiSTer (which operates at original speed).

To help using the Apple II core with this I started making an archive of .nib save disks ready for use.
For example, I added four "save slots" for Ultima II by making a player disk and duplicating it before creating a character.
What are your favorite games and which save files would you like to see added to this archive?


Files:

Apple-II_disk_write_20220415.rbf

Saves (Player Disks).zip
THANKS! This is an enormous work!
AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Apple II Core

Unread post by AmintaMister »

Newsdee wrote: Sun Apr 17, 2022 12:40 am Here is a test build by alanswx that I've been testing recently,
adding a second floppy drive and the ability to save disks in .nib format to the SD card!

I was able to play Adventure Construction Set and Ultima II with it so far.

It needs disks to be in .nib to write back to them. This is an acceptable trade-off since this is not a copy-protected format anyway; and it also helps keep your files tidy on your SD card e.g. all saves in a separate folder. I would also recommend preparing save disks in AppleWin first since it formats and copies data much faster than MiSTer (which operates at original speed).

To help using the Apple II core with this I started making an archive of .nib save disks ready for use.
For example, I added four "save slots" for Ultima II by making a player disk and duplicating it before creating a character.
What are your favorite games and which save files would you like to see added to this archive?


Files:

Apple-II_disk_write_20220415.rbf

Saves (Player Disks).zip
OK, tonight I've tested some games... The problem is that games that load, work, but there are many games that load with regular core and not with yours, eg Transylvania 1985, The Oregon Trail (hangs on first picture), "Birth Of The Phoenix (1981)(Phoenix Software) & Global Thermonuclear War (19xx)(-) & Hitchhiker's Guide To The Galaxy, The (1984)(Infocom)" disk or others that have problem, like Transylvania 1984 (loads, you can play but you get a long series of "I don't understand" from the parser without touching a key (in regular core it works flawlessly)...
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 noticed that some games that seems to not work, are instead loading *very* slowly with this updated core. For example, Ultima IV boot disk, converted from SDK with the dsk2nib utility on Github.

- standard core, in DSK format, loads very fast

- standard core, in NIB format, loads slower than the DSK version, but not too slow

- updated core with write support loading the same NIB file, loads extremely slow
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 »

AmintaMister wrote: Sun Apr 17, 2022 10:25 pm "Birth Of The Phoenix (1981)(Phoenix Software) & Global Thermonuclear War (19xx)(-) & Hitchhiker's Guide To The Galaxy, The (1984)(Infocom)" disk
Thanks, this disk in particular is a very useful test case... it prints out disk access info on the bottom right.

I did notice the core was a bit slower; at first I thought it was due to the un-enhanced disk speed,
but comparing this disk with an emulator at 1x speed shows its much slower than the original.

If anybody wants to help eyeball the code, the branch is here: https://github.com/alanswx/Apple-II_MiSTer
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Apple II Core

Unread post by pgimeno »

virtuali wrote: Sun Apr 17, 2022 7:54 am It must be compiled from source, but it's extremely easy to do, since it's a single .C file with no strange dependencies. I did it in Windows under Linux/Ubuntu terminal mode, but I guess it could be done directly from Mister, although it will likely be slower.
MiSTer has no compiler (unless you install Arch or similar).

If people are interested I could perhaps work on porting this program to Python, so it runs on MiSTer out of the box without compilation.
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 »

Here is a compiled version of dsk2nib for Windows. I use it by drag & dropping a .dsk onto it.
(sources and vcproject are included)
Attachments
dsk2nib.zip
(37.33 KiB) Downloaded 418 times
Umpfy
Posts: 1
Joined: Sat May 14, 2022 8:43 pm

Re: Apple II Core

Unread post by Umpfy »

I attempted to use this new disk writing core with Where in the World is Carmen Sandiego, specifically a 4am clean-crack version. Obtained .dsk's from archive.org, converted to .nib using the dsk2nib above, resulting in: "Where in the World is Carmen Sandiego v2.0 (4am crack) side A.nib" and "Where in the World is Carmen Sandiego v2.0 (4am crack) side B.nib"...

Game loads fine, it prompts for your name, and I can confirm that does actually save, as reloading the disk and entering the name loads the save instead of saying you're a new user. But shortly after entering your name, it prompts for Side B... and of course I go into the menus and insert Side B into either or both of the 2 floppy drives... and it never allows me to get past the prompt.

Am I missing something or is it still the core?
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 »

Umpfy wrote: Sat May 14, 2022 8:48 pm Am I missing something or is it still the core?
The core still has issues unfortunately. Read time is much slower than normal.
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 »

Are there any news regarding the write? Anybody working on it?

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

gklinger
Posts: 5
Joined: Thu Apr 01, 2021 1:29 am
Has thanked: 2 times

Re: Apple II Core

Unread post by gklinger »

RedskullDC wrote: Tue Nov 16, 2021 3:37 pm Also changed the Shift-3 key from '£' to '#' .
(That's a temporary fix, as there should be a switch to select either)
I just updated my core today to be sure I'm using the latest and I still get £ when I press shift-3. It works as it should (as in PR#£ does enable 80 column mode) but it I feel like I'm missing something. Has the switch been implemented and if so, how do I switch? I need me some #. :)
DaveRL
Posts: 3
Joined: Sat May 30, 2020 5:10 am
Been thanked: 1 time

Re: Apple II Core

Unread post by DaveRL »

Just checking back in to see if anyone had implemented the write protect for disk drive images.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Apple II Core

Unread post by Malor »

I don't think anyone is working on the Apple ][ core at all right now.
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 »

Malor wrote: Sat Nov 12, 2022 8:36 pm I don't think anyone is working on the Apple ][ core at all right now.
That's a shame I'd patreon anyone who picked this core up.
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 »

Supposedly the Apple IIgs core is/was being worked on. I hope it appears one of these days. I have an Apple IIc, and I always wanted a IIgs.
mbalmer
Posts: 19
Joined: Wed May 27, 2020 3:08 pm
Has thanked: 3 times

Re: Apple II Core

Unread post by mbalmer »

I think the fact that nobody is working on the Apple II or IIgs cores at the moment is largely a result of the MiSTer's European origins. The Apple line never really had much penetration at all in Europe (especially Eastern Europe) so it stands to reason that the active developers would be more interested in recreating systems that they grew up with. All you have to do is look at how much work is still being done on the Minimig and C-64 cores for that.

I find it unfortunate, too, because I wish there was someone who was willing to work on the Apple II cores as well. I know nothing about building FPGA cores, or I would.

The other possible reason that these cores don't see much work is related to just how hacked together the Apple IIs were from the get-go. Woz was a genius-level engineer, and so many of the things he did to bolt on additional functionality to the original Apple II were astounding. For example, consider that the original machine wasn't even supposed to be able to draw in color -- and only could do so once Woz perfected the NTSC artifacting tricks to make it possible. Untangling all of the hardware hacks to make everything work (to say nothing of the hacks employed by some software writers) could be a big reason why the cores don't see much development, too.

I wish that was different, but I've got little ability to change things.

dmckean
Posts: 310
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 396 times
Been thanked: 95 times

Re: Apple II Core

Unread post by dmckean »

The European bias is probably somewhat true, after all we have a perfectly working ZX Spectrum core and that was Europe's Apple II.

MrMartian
Posts: 21
Joined: Wed Nov 24, 2021 4:04 pm
Has thanked: 18 times
Been thanked: 36 times

Re: Apple II Core

Unread post by MrMartian »

I have been playing with the a2 core, but between work and wife's cancer treatments it's slow going.

alanswx's version does mostly work. I'm just trying to make it more consistent on speed.

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 »

mbalmer wrote: Tue Dec 13, 2022 4:12 pm

The other possible reason that these cores don't see much work is related to just how hacked together the Apple IIs were from the get-go.

I love my Apple IIe, but it is clearly the result of a bunch of clever hacks... which was fine for the time but a pain to cater for now (still amazed programmers managed to make color sprites for it given how A2 video works)

It would be nice if the core could support the woz disk format, but that needs a full rewrite from what I understand. Even disk write on .nib seems quite difficult to do... ithe disk logic is very sensitive to timings.

mrcoleco
Posts: 2
Joined: Sun Feb 19, 2023 12:09 am
Been thanked: 2 times

Re: Apple II Core

Unread post by mrcoleco »

Hi, longtime Apple //e and IIgs user here. I have been unable to locate a key mapped to the Apple II "Reset" key in the Apple II Mister core. Can someone please identify which key is so mapped or, alternatively, how I can manually map a key to the "Reset" key?

Also, any progress on achieving a version of this core with disk-writing capability? It breaks my heart to see such perfect cores for the C64 and Spectrum, but such an incomplete core for my beloved Apple II. Without disk-writing capability, the Apple II becomes little more than a video game console. But it was and is so very much more than that to all of us who have been using it for decades.

Thank you.

rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: Apple II Core

Unread post by rhester72 »

re: RESET - I looked through the core docs and didn't actually see how it's implemented on MiSTer, but it uses a dedicated (physical) button on the MiST. Perhaps try hitting the User button?

mbalmer
Posts: 19
Joined: Wed May 27, 2020 3:08 pm
Has thanked: 3 times

Re: Apple II Core

Unread post by mbalmer »

re: RESET - I looked through the core docs and didn't actually see how it's implemented on MiSTer, but it uses a dedicated (physical) button on the MiST. Perhaps try hitting the User button?

This is correct. The USER button mimics the RESET button on the A2.

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 »

I have some disk fixes to test..

Attachments
Apple-II.rbf
(3.41 MiB) Downloaded 225 times
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 »

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

I have some disk fixes to test..

Some tests I've done:

  • Speed test (Birth of the Phoenix custom loader): sector/track read works at expected speed

  • ACS game creation: worked with 2 disks

  • Wizardry1: able to create characters

Working great so far!

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 »

What type of disk image is supported for writing? (.dsk, nib, woz, po)? What about formatting disks? I will test it out.

Initial testing:

  • King's Quest I using .DSK file, I was able to "init disk" and save and restore from it. Great!!!
  • Tried Copy2Plus 9.1, and it had a message on the screen "Requires Enhanced Apple IIe or Later". This program would be a great test for disk writing.
  • Unrelated: One of my broken BASIC programs has "Error #11" on it on my Apple IIc, but the # sign is a £ on the MiSTer core. It says "Error £11".
  • Unrelated: Most of my Smartport HD's have a .po extension. There is only an option for .hdv in the core menu.
  • Unrelated: Pitfall 2 crashes when booting
  • Unrelated: The Mockingboard stereo channels are backwards/reversed. I have to say listening to "Pure Noise" in quasi-quadraphonic stereo with the MiSTer in one corner of the room and my Apple IIc with Mockingboard 4c in the other corner of the room playing the same song at the same exact time is a blessing to behold! It probably temporarily helps that the channels are backwards because there is a sort of center channel between the two computers.
AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 841 times
Been thanked: 51 times

Re: Apple II Core

Unread post by AmintaMister »

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

I have some disk fixes to test..

Tried with Transylvania 1982 4Am, it worked great with a .nib image as data disk!

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 »

thorr wrote: Tue Jul 04, 2023 9:28 pm

What type of disk image is supported for writing? (.dsk, nib, woz, po)? What about formatting disks? I will test it out.

Initial testing:

  • King's Quest I using .DSK file, I was able to "init disk" and save and restore from it. Great!!!
  • Tried Copy2Plus 9.1, and it had a message on the screen "Requires Enhanced Apple IIe or Later". This program would be a great test for disk writing.
  • Unrelated: One of my broken BASIC programs has "Error #11" on it on my Apple IIc, but the # sign is a £ on the MiSTer core. It says "Error £11".
  • Unrelated: Most of my Smartport HD's have a .po extension. There is only an option for .hdv in the core menu.
  • Unrelated: Pitfall 2 crashes when booting
  • Unrelated: The Mockingboard stereo channels are backwards/reversed. I have to say listening to "Pure Noise" in quasi-quadraphonic stereo with the MiSTer in one corner of the room and my Apple IIc with Mockingboard 4c in the other corner of the room playing the same song at the same exact time is a blessing to behold! It probably temporarily helps that the channels are backwards because there is a sort of center channel between the two computers.

multiple formats are converted to nib by the mister binary. I think only .nib will persist saves across core reloads.

Not sure why copy2plus 9.1 doesn't work
I know about the font issue with & and # - i need to tackle that.
not sure if you can just rename the smartport hd - maybe drop one somewhere and i can play with it. Some images have an extra header that needs to be removed.
should I swap the mockingboard? that is interesting. i wonder if there is an obvious app to test 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 »

alanswx wrote: Wed Jul 05, 2023 1:00 am

multiple formats are converted to nib by the mister binary. I think only .nib will persist saves across core reloads.

Not sure why copy2plus 9.1 doesn't work
I know about the font issue with & and # - i need to tackle that.
not sure if you can just rename the smartport hd - maybe drop one somewhere and i can play with it. Some images have an extra header that needs to be removed.
should I swap the mockingboard? that is interesting. i wonder if there is an obvious app to test that.

Thanks! I didn't try reloading the .dsk file after a core reload. It did work temporarily. It would be cool to have a long-term fix for this. If .dsk is too limited, then maybe have an option in the core to convert the mounted file to .nib for writing (Convert Disk 1 To NIB for Writing -- Convert kq1.dsk to kq1.nib? (Y/N)).

I think the ProDOS version has something to do with Copy2Plus 9.1 not working.

I renamed my smart.po hard drive file to smart.hdv and it started booting, but it has the same message about needing an Enhanced IIe. I have attached it here for your reference. I was starting to create "Mall Madness" with high quality speech. I didn't make the actual game yet, but it was a proof of concept program to see if I could get good digital sound. It would be cool if .po was accepted along with .hdv for hard drive files (I think it is just an extension difference).

Also in the attachment is Pitfall II. This boots fine on my Apple IIc. It has Mockingboard support.

Also in the attachment is Pure Noise. It shows left and right speakers in the graphics with bars coming out when the music is playing. The sound is coming out backwards.

Thanks!

Also, if it is not too much trouble, dual Mockingboards would be cool! https://www.youtube.com/watch?v=HFhPjdfNKys

Attachments
test.zip
(311.69 KiB) Downloaded 202 times
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 »

For Copy II Plus, did you switch the CPU type to 65C02? I'm not sure how the core handles the other differences, but that's the main thing "Enhanced IIe" software is usually looking for.

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 »

ExCyber wrote: Wed Jul 05, 2023 3:05 am

For Copy II Plus, did you switch the CPU type to 65C02? I'm not sure how the core handles the other differences, but that's the main thing "Enhanced IIe" software is usually looking for.

Thanks! That did the trick! My smart.hdv boots too and the speech works. It's a good test for the sound.
It also fixed Pitfall II, but it revealed another issue. We need to have volume controls for the Mockingboard and the internal sound. When playing Pitfall II, it uses both and when he runs, it is much louder than the music.

Post Reply