Apple ][ tv driver
Baggers
Posts: 3,019
Hi all,
Thought I'd create a new thread for this one, incase anyone else wants to use it.
I've modified the parallax tv driver to now be an Apple ][noparse][[/noparse] tv driver [noparse]:D[/noparse]
40x24·Characters in text mode, and 40x48 16 colour pixels in graphics mode, and 40x40 16 colour pixels + 40x4 Characters at the bottom of the screen.
What's differet about this driver is the fact that the font is 7 pixels wide, compared to 8 or 16, so although the screen is 40 characters wide it's only 280 real pixels.
I've included a print and plot for the graphics mode.
All sources are included.
Baggers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
Thought I'd create a new thread for this one, incase anyone else wants to use it.
I've modified the parallax tv driver to now be an Apple ][noparse][[/noparse] tv driver [noparse]:D[/noparse]
40x24·Characters in text mode, and 40x48 16 colour pixels in graphics mode, and 40x40 16 colour pixels + 40x4 Characters at the bottom of the screen.
What's differet about this driver is the fact that the font is 7 pixels wide, compared to 8 or 16, so although the screen is 40 characters wide it's only 280 real pixels.
I've included a print and plot for the graphics mode.
All sources are included.
Baggers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
Comments
On line 9 of JB_Apple_TV_Test.spin, change to:
On line 20 of JB_APPLE_TV_Test.spin change to:
On line 126 of JB_APPLE_TV.spin change to:
On line 174 of JB_APPLE_TV.spin change to:
...those should get it working for you.
on the JB_APPLE_TV code, it is a matter of adjusting the VMode values for the different pin groups.
Great work, as always Baggers!
--trodoss
Post Edited (trodoss) : 2/7/2009 12:18:58 AM GMT
Thanks again [noparse]:D[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
I have had a little more time to look at the code, and have been enjoying playing around with Apple ][noparse][[/noparse] graphics.
I especially like the WaitVSync implementaiton (since that is something I had been trying to figure out how to do easily for a while), and being able to have inverted and/or flashing characters is very nice.
Are you planning on mimicing the "High graphics" mode in some way, or is that out of scope of what you are trying to do with that project? [noparse][[/noparse]Edit:]·What I would mean by that is emulating the Monitor // (the monochrome CRT monitor that was produced), rather than trying to do the 6-color 280x192 graphics.· Maybe you could make the color the same bright greenish color?
Even with out the high graphics mode, it looks like you could get Apple(Integer) BASIC, whether through emulation or just a re-write, working well. That alone would be all sorts of fun.
Post Edited (trodoss) : 2/9/2009 4:10:50 PM GMT
I'm glad you liked it, and are having fun playing with it [noparse]:D[/noparse]
As for hi-res mode, I'm not sure how the memory is layed out on the Apple ][noparse][[/noparse] Hi-res graphics mode, to be able to emulate it, all I know is it had up to 8 ( 6 + B&W ) available to use, and was 280x192, and 40 bytes of bits 6-0 for the pixels and the MSB was to select what colour, but I don't know how or where from? as it's one bit, to select the colours?
So if you or anyone else knows the memory layout and how the colours were addressed, ( and also the pixel layout, as the text mode wasn't sequential either ) then I'll do that for you.
Maybe OBC could knock together a version of FemtoColor to use it?
OBC, if you want me to make the display sequential so you don't have to mess about it should fit straight in with Femto [noparse]:D[/noparse]
Baggers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
I had edited my post when you were responding [noparse];)[/noparse] What I was getting at for the "high color" emulation was using a 2-color mode and emulating the old monochrome displays for the Apple 2. Finding the memory layout would be challenging. To do the monochrome you would probably need to know what value (black/white, or a pattern of one of the two) maps to what physical color being displayed. If I can find that I will certianly pass it along.
high-bit = pixel phase shift = 1/4 ntsc color clock.
lower 7 bits = pixel data.
All Woz (the creator of the Apple) did was turn on the colorburst in the simple way, like what you see in the simple_ntsc drivers. That's fixed chroma timing. No phase adjust of any kind. (means Apple computers wouldn't do PAL without modification)
Color graphics then were pure artifacting! All the computer did was draw pixels to the screen, and the TV did the rest.
Because of how NTSC color works, two pixels set anywhere equaled a white pixel. Two unset anywhere were a black pixel. A single pixel was either red or blue, depending if it was an odd or even pixel, and if the high bit was set to achieve the slight pixel position shift, then it was a green or magenta pixel.
When the chroma it set at a fixed timing, anything drawn to the screen that is smaller than one full color clock, gets intrepeted as color data by your average TV. The phase shift bit actually just moved the pixels slightly on the screen, and was the first implementation of a color cell type video graphics encoding. That was later seen on many machines, as a color table, including the Spectrum, C64 and Propeller today.
||||||||||||| <-- Green / Magenta pixels shifted
|||||||||||| <-- Red / Blue pixels not shifted.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
so, trodoss, what do you want the display driver for?
Do you want a bitmap with attributes? and do you want the bytes and attributes 7 or 8 pixels wide?
Also do you want it linear? instead of the mad order it has.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Eh, it isn't worth all that work if it is just something for me [noparse];)[/noparse]
I had been looking at the old Apple ][noparse][[/noparse] games, and had seen an early version of the AGI parser in King's Quest 1, and had thought about looking at doing a crude form of a port of the AGI engine. They used the "high graphics" mode for that, so I was just curious if it was something you had thought of building in anyway (to support other things when the emulator is written). The oddities of the display driver, although necessary for the Apple ][noparse][[/noparse] emulation, would just make using it harder for how I might try to use it. I would probably be better off writing another driver for that sort of thing though, since I will end up dealing with a priority/control layer that would 'sit behind' the displayed screen, and, depending on memory constraints, have to leave off other features (such as palette) anyway.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
That would certianly be a nice implementation, if you were planning on creating that for general use.
·
The PC AGI used a 160x168 bitmap (stretched to 320 wide) for rendering their 'pic' resources.· From what I can tell from screenshots of the Apple ][noparse][[/noparse]'s version, it was about 280 wide (which, it was probably doing with·extra memory on the 2/2e). 128x160 as a 'custom' AGI implementation would work, but would mean that 20k (with the priority/control layer) would leave 12k for the rest of the implementation (including the object/character view resources).· The PC AGI implementation used 64K RAM, so starting with only half that (some of which has to be code), makes it a little challenging.
The more I think about it though, the more I think it probably makes more sense to try to do an interpreter/etc. more llike "Spellbound,"·or·"Stormbringer"·(the good old "MAD" games) on the ZX Spectrum/C64.· Tile-based would be easier both to code, and not require as many resources.·
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New ICON coming, gotta wait for the INK to heal, now we have colour!
Can you post what you have now, and I'll test it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
On line 9 of JB_Apple_TV_Test.spin, change to:
_xinfreq = 5_000_000
On line 20 of JB_APPLE_TV_Test.spin change to:
modepins = PROTOBOARDPINS
On line 126 of JB_APPLE_TV.spin change to:
movi VCFG, #%0_11_011_000
On line 174 of JB_APPLE_TV.spin change to:
movi VCFG, #%0_11_111_000
I'm going to wire up tv out on my protoboard and see if that is different..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New ICON coming, gotta wait for the INK to heal, now we have colour!
I'll have a test later tonight too when i've finished work for the day
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New ICON coming, gotta wait for the INK to heal, now we have colour!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New ICON coming, gotta wait for the INK to heal, now we have colour!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
This is a great accomplishment and well done!
Now if we can get AppleSoft BASIC up and running with
some kind of Apple II (II+, C, E, etc.) simulator...
humanoido
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
These are generally available online, as the Apple ][ reference manual has been uploaded somewhere, I'm sure.
An interesting application would be for an Apple ][ VGA card, which could be of great use to people who
want to use VGA LCD monitors with their vintage hardware
The propeller could read the Apple II RAM (assuming sufficient I/O pins), and respond to the control addresses
around C0XX to switch display modes between text, 40/80 columns, lo-res graphics, hires graphics, and double-hires.
There was a propeller laptop project that showed hardware interfacing ideas, though it would be different as an Apple //
expansion card.
Something like a triblade prop as an Apple // expansion card would be a wonderful thing for Apple users, and a challenging project
You could have your CP/M card, VGA card, CF adapter, and stereo sound Card all in one slot!
I still have an unused Apple // prototype card, but alas, no Apples anymore - had to go in the 2000 move
I hold a patent for high speed I/O on the Apple bus - designed a Z80 and then a Z8 comms card that communicated with IBM mainframes. I did know Harry who made the Zofary 80 column card.
Eric Ball has Apple style TV drivers with more colors on the display in his blog too. Haven't had the time to work with them, but "Double High Res" is basically there on the Prop, minus the funky addressing seen on the Apple.
Why don't you see if you can make a Apple I emulator for the C3? Something like what Vince Briel did with the Atmel chips etc. Not the whole thing, but if you can do the video, BASIC and whatever else you can get working from the Apple I design, that would be sweet. It could be a full emulator, or just a simulator that runs BASIC code, of course, if you could emulate the 6502 and the graphics hardware and run real code, that would be sweet. The Apple ][ would be too much I think, but the Apple I is doable --
What do you think? Then we can send Steve Wozniak one of them If he could plug the C3 into a Apple monitor and program a Apple I basic program that would be cool. I keep in touch with him, so I might be able to get him to check it out (he is ULTRA busy), but I might be able to get him to play with it, and have a picture taken that would could post
Unless of course, you could get the Apple ][ emulated or simulated on the C3, or a major portion of it then that would be ULTRA cool!!!!
Andre'