Apple II Core

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 19, 2024 5:52 am

Is this your monitor by any chance? https://oldcrap.org/2019/05/14/apple-iic-monitor/
Also does your IIc have some kind of dongle to connect to the video-port, allowing to plug a "regular" composite jack to it?

Either way, it's clear your monitor does not do artifact color ... so we have to generate the color in the core.

The reason I am using the IIc monitor is because I have a real IIc and a MiSTer, so we can try to get the two outputs to match exactly with the same monitor.

Yes that's a great test to make. I suspect the extra color circuitry is in the dongle used with the IIc.
We have room for a "//c PAL" palette; I've used your values for now until we determine a better one.

Thanks for your help! No, this is my monitor. https://i.imgur.com/vOvLkAg.jpeg Here is a repair video for it. He hooked up a color bar generator and other sources and said it had great color, so I don't think it is inaccurate due to some kind of strange composite input: https://www.youtube.com/watch?v=1U1uRJXIUj0

I also hooked the MiSTer up to my Toshiba NTSC TV via composite with the exact same result (B&W is B&W, not color). So perhaps something on the MiSTer side is the cause. I am using an Antonio Vilenna IO board with the MiSTer for my testing and perhaps because it has different video DACs, it is causing the discrepancy, or perhaps I am missing a setting somewhere. I don't have a standard analog board on my other MiSTer. I can ask A.V. about this if it makes sense to. I plan to get the new IO board for my other MiSTer when it becomes available, so I could try that when it gets here.

Meanwhile, if you can create a new RBF using my monitor's color based on the photo for the IIc palette, that would be great! I will test that with the Toshiba TV and have the Apple IIc in the same room and I can see how they look side by side in person. My TV's color should be pretty good. I am picky about color calibration.

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

thorr wrote: Sun May 19, 2024 1:39 pm

if you can create a new RBF using my monitor's color based on the photo for the IIc palette, that would be great!

I already did :)
Check the attachment in my post above: viewtopic.php?p=86672#p86672

No, this is my monitor. https://i.imgur.com/vOvLkAg.jpeg

It could be the adapter; I think early A.V. adapters had their own clock so they operate at a different frequency than the core.
But your might be an earlier model. Anyway - try the build above and hopefully you'll get good colors.

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 19, 2024 2:32 pm

It could be the adapter; I think early A.V. adapters had their own clock so they operate at a different frequency than the core.
But your might be an earlier model. Anyway - try the build above and hopefully you'll get good colors.

I just thought of something and came here to post it. It could be the adapter, lol. I have two of them because S-Video didn't work on the first one because two of the connections were reversed. Composite still worked. I need to find my other adapter and test with that. They are the MikeS design by A.V.

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 19, 2024 2:32 pm
thorr wrote: Sun May 19, 2024 1:39 pm

if you can create a new RBF using my monitor's color based on the photo for the IIc palette, that would be great!

I already did :)
Check the attachment in my post above: viewtopic.php?p=86672#p86672

So that is color matched to my photo? I was asking for two different things so I am not sure what I should be selecting:

1) I provided a rotated photo that we have been talking about of my IIc monitor. Which core setting should I choose for the colors that match this with RGB/component?
2) I provided a list of what color matches the closest for each number 1-14. Did you provide this? I thought this was "handpicked".

Thanks!

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

thorr wrote: Sun May 19, 2024 2:44 pm

[) I provided a list of what color matches the closest for each number 1-14. Did you provide this? I thought this was "handpicked".

Oh you're right - it is the list (not the picture of RGB).
Maybe we need to have a custom palette option so you can load what you want ... will give it a try at some point

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 19, 2024 2:54 pm
thorr wrote: Sun May 19, 2024 2:44 pm

[) I provided a list of what color matches the closest for each number 1-14. Did you provide this? I thought this was "handpicked".

Oh you're right - it is the list (not the picture of RGB).
Maybe we need to have a custom palette option so you can load what you want ... will give it a try at some point

That would be cool. Then I could exactly dial in the composite out colors. In the meantime, maybe just make a "IIc Monitor" option for RGB. This is probaby all temporary until we can get to the final solution for the end users.

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 19, 2024 12:51 am

Could you try it with the Black & White mode?

I found my other composite adapter and on my TV, it is very dim, but I can see the various colors barely. On my Apple IIc monitor It looks mostly like a bunch of different shades of gray. There may be a hint of color in there, but it is nothing like what it should look like. When selecting Color mode, both the TV and the monitor come to life with plenty of color.

xboxown
Posts: 21
Joined: Thu Feb 15, 2024 5:46 am
Been thanked: 7 times

Re: Apple II Core

Unread post by xboxown »

I LOVE APPLE // SO MUCH AND LOVE APPLE // CORE ENORMOUSLY!!!! The Apple // remains to be my favorite core between them all hehe. It have a special place for me.

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 19, 2024 12:51 am

Could you try it with the Black & White mode?

FYI - I plan to get the new official analog IO board for my other MiSTer. Hopefully it won't change the behavior of composite video compared to the older version of the official analog IO board, and I will test again. I also already received my new macro lens. I won't be able to work on this for 2-3 weeks though. For the color values, is it R, G, and B values from 0 to 255? I can provide these as well. Thanks.

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

Update: custom palettes!

Attached is a test build that adds the option to load in your own palette.
Now anybody can customize the core to their heart's content!

I've also added a shortcut (F8) to cycle through baked-in palettes and the custom one.
You can also use F9 to switch between color and monochrome modes. Use both to switch modes in-game.

The custom colors are defined in a .a2p file.
You can edit/create the files using a hex editor such as HxD: https://mh-nexus.de/en/hxd/

I've provided some examples in the attached .zip , each color uses 3 RGB values + 00 to separate.
So far I'm pretty happy as to how the "PC CGA" palette turned out.

Attachments
Palettes.zip
(1.38 KiB) Downloaded 43 times
Apple-II_custom_palette.rbf
(3.41 MiB) Downloaded 37 times
thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 26, 2024 3:47 pm

Update: custom palettes!

Awesome! I can't wait to play with this, especially with the new IO board and IIc monitor. Once I get it perfect, I will share my results.

User avatar
Bristles
Posts: 74
Joined: Wed Aug 16, 2023 8:36 pm
Has thanked: 33 times
Been thanked: 10 times

Re: Apple II Core

Unread post by Bristles »

How do you display the colour bars on a real Apple IIe ?
I wouldn't mind hooking up my own Apple IIe to the same PVM my Mister is connected to, and testing which palette closely matches the real thing.

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

Bristles wrote: Sun May 26, 2024 6:10 pm

How do you display the colour bars on a real Apple IIe ?

Can you use .dsk images? Then you can use the attached diagnostic disk - it's the one I use to test.

Otherwise, attached is a screenshot of Woz's own test program (from an Apple II article from 1978),
you can type that in to display some color bars.

Attachments
color_test.JPG
color_test.JPG (43.89 KiB) Viewed 1906 times
Apple_IIe_Diagnostic_v2.1_19xx_-.dsk.zip
(43.94 KiB) Downloaded 34 times
User avatar
Bristles
Posts: 74
Joined: Wed Aug 16, 2023 8:36 pm
Has thanked: 33 times
Been thanked: 10 times

Re: Apple II Core

Unread post by Bristles »

Thanks for that disk. I have a SDisk2 Floppy Emulator for my Apple IIe, it only supports NIC files, but dsk files can be converted to NIC, so that is no problem.
Many thanks.

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 26, 2024 3:47 pm

Update: custom palettes!

Thanks for the new version! Today I received my new v9.2 I/O board, and I had an available evening to briefly test it out. See my not so good phone photos here: https://imgur.com/a/oK5iVbC

What I am finding is that the built-in IIe version is really pretty good, except for Color 7 which is pretty far off. Also, TEXT mode is pure white on the actual IIc and has color artifacts from the MiSTer. All of this is using the "Color" mode.

Using the B&W mode changes the colors to B&W, but the text mode still has some color to it, where on the IIc, it is pure black and white.

sharklodon
Posts: 43
Joined: Thu May 06, 2021 1:16 pm
Has thanked: 18 times
Been thanked: 18 times

Re: Apple II Core

Unread post by sharklodon »

Nice work!!!

Add a Z80 SoftCard would be awesome!!!

I'd like to run CP/M on it!!!

Please, check this doc (section 3.7 The Z80 SoftCard):
https://www.ele.uva.es/~jesus/a2.pdf

And sources (with z80 softcard implemented):
https://www.ele.uva.es/~jesus/a2.tgz
https://www.ele.uva.es/~jesus/a2e128.tgz

https://opencores.org/projects/cpu6502_true_cycle

Best regards,
Shark,

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

That source code included a feature to emulate disk sounds...(!) so I've tried incorporating it to our core.
You can try my test build for now (I might tinker with it more before submitting it)

Attachments
Apple-II-disk_sound.rbf
(3.42 MiB) Downloaded 20 times
User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

oops... a small bug crept in; "Yes" is "No" in the menu option for turning it on. Here is a corected core

Attachments
Apple-II_disk_sound.rbf
(3.42 MiB) Downloaded 30 times
sharklodon
Posts: 43
Joined: Thu May 06, 2021 1:16 pm
Has thanked: 18 times
Been thanked: 18 times

Re: Apple II Core

Unread post by sharklodon »

Newsdee wrote: Sun Jun 02, 2024 2:18 pm

oops... a small bug crept in; "Yes" is "No" in the menu option for turning it on. Here is a corected core

Hi, I've tested it but it's true that the sound is indeed very low, almost negligible.

Regards,
Shark

EeDee
Posts: 248
Joined: Thu Dec 24, 2020 12:33 pm
Has thanked: 10 times
Been thanked: 48 times

Re: Apple II Core

Unread post by EeDee »

Thanks for adding disc sound @Newsdee but, yes, it is barely audible.

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

EeDee wrote: Thu Jun 06, 2024 10:46 pm

Thanks for adding disc sound @Newsdee but, yes, it is barely audible.

I like how it is at the usual volume I run the core; but will revisit if I find a good way to increase the volume.

EeDee
Posts: 248
Joined: Thu Dec 24, 2020 12:33 pm
Has thanked: 10 times
Been thanked: 48 times

Re: Apple II Core

Unread post by EeDee »

Newsdee wrote: Thu Jun 06, 2024 10:58 pm
EeDee wrote: Thu Jun 06, 2024 10:46 pm

Thanks for adding disc sound @Newsdee but, yes, it is barely audible.

I like how it is at the usual volume I run the core; but will revisit if I find a good way to increase the volume.

Fair enough. If, though, you do revisit it and are able to increase the volume then perhaps a choice of low/med/high?

thorr
Top Contributor
Posts: 1202
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 593 times
Been thanked: 271 times

Re: Apple II Core

Unread post by thorr »

Newsdee wrote: Sun May 26, 2024 3:47 pm

Update: custom palettes!

Can you provide the palette for the IIe that is built into the core? I would like to use that as a starting point. I plan to hook up a video switchbox to my IIc and my MiSTer going to my composite monitor and switch back and forth editing the values until I get an exact match for each color. Then I will provide the "perfect" palette. Thanks.

rcade
Posts: 108
Joined: Wed May 27, 2020 7:57 pm
Been thanked: 14 times

Re: Apple II Core

Unread post by rcade »

EeDee wrote: Thu Jun 06, 2024 10:46 pm

Thanks for adding disc sound @Newsdee but, yes, it is barely audible.

I don't hear any disk sounds at all. It just seems to add background noise? Is another file needed?

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

thorr wrote: Fri Jun 07, 2024 10:52 pm

Can you provide the palette for the IIe that is built into the core? I would like to use that as a starting point.

You will find that palette here, under "Apple_IIe_NTSC.a2p":
https://github.com/MiSTer-devel/Apple-I ... ic/AppleII

Edit the file with a hex editor such as HxD; it's 24-bit values (RGB) separated by a zero byte

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

EeDee wrote: Fri Jun 07, 2024 10:21 pm

Fair enough. If, though, you do revisit it and are able to increase the volume then perhaps a choice of low/med/high?

rcade wrote:

I don't hear any disk sounds at all. It just seems to add background noise? Is another file needed?

Try this version, made it much louder

Attachments
Apple-II_floppy_louder.rbf
(3.45 MiB) Downloaded 16 times
rcade
Posts: 108
Joined: Wed May 27, 2020 7:57 pm
Been thanked: 14 times

Re: Apple II Core

Unread post by rcade »

Newsdee wrote: Mon Jun 10, 2024 6:41 am
EeDee wrote: Fri Jun 07, 2024 10:21 pm

Fair enough. If, though, you do revisit it and are able to increase the volume then perhaps a choice of low/med/high?

rcade wrote:

I don't hear any disk sounds at all. It just seems to add background noise? Is another file needed?

Try this version, made it much louder

It's still extremely subtle. Maybe I am missing something. It resembles something more like the electrical interference of a disk drive if you stuck an AM radio next to the Disk II cables...

It's supposed to play out the regular sound output of the MiSTer?

sharklodon
Posts: 43
Joined: Thu May 06, 2021 1:16 pm
Has thanked: 18 times
Been thanked: 18 times

Re: Apple II Core

Unread post by sharklodon »

Newsdee wrote: Mon Jun 10, 2024 6:41 am
EeDee wrote: Fri Jun 07, 2024 10:21 pm

Fair enough. If, though, you do revisit it and are able to increase the volume then perhaps a choice of low/med/high?

rcade wrote:

I don't hear any disk sounds at all. It just seems to add background noise? Is another file needed?

Try this version, made it much louder

Hi,

I've tested it and now it sounds better, much louder but still not enough. I've had to increase the speakers volume level to notice the difference. On the other hand, the first version was practically inaudible.

However, it's true that in this core the sound is very low in general.

Thanks a lot for your work,
Shark

EeDee
Posts: 248
Joined: Thu Dec 24, 2020 12:33 pm
Has thanked: 10 times
Been thanked: 48 times

Re: Apple II Core

Unread post by EeDee »

As things stand presently we can hear disc access which was not present before. I have no original Apple II hardware exposure whatsoever but I do like this core and, as far as I can tell, the "background hiss" of the drive is consistent with the motor constantly running until it has loaded a program from disc. The disc sound can always be disabled if it becomes an annoyance I suppose 😁
Thank you for your additions @newsdee, especially for including Alan's Write Protect feature

User avatar
Newsdee
Top Contributor
Posts: 849
Joined: Mon May 25, 2020 1:07 am
Has thanked: 101 times
Been thanked: 230 times

Re: Apple II Core

Unread post by Newsdee »

rcade wrote: Tue Jun 11, 2024 12:49 am

It's still extremely subtle. Maybe I am missing something. It resembles something more like the electrical interference of a disk drive if you stuck an AM radio next to the Disk II cables...
It's supposed to play out the regular sound output of the MiSTer?

Yes, it's part of the regular sound output.

Try this new version - it sounds better to me now.

Turns out the code I found had also sounds for a spinning disk (that really adds to the illusion that a disk is spinning up and stopping),
but I could only hear it after I did this last tweak.

I have also added an option to disable the speaker; so you can try increasing the volume as much as you want.

And... yes, it does sound a bit like phone interference. It does not sound the same way as the original; but it is close enough in terms of "rythim" . It's like having some kind of physical drive, even if you can tell it's not the original one.

Attachments
Apple-II_floppy_louder2.rbf
(3.42 MiB) Downloaded 16 times
Post Reply