Shop OBEX P1 Docs P2 Docs Learn Events
Apple ][ tv driver — Parallax Forums

Apple ][ tv driver

BaggersBaggers Posts: 3,019
edited 2011-02-12 21:40 in Propeller 1
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

Comments

  • trodosstrodoss Posts: 577
    edited 2009-02-07 00:08
    I don't know if anyone other than me uses a 'protoboard' setup, but just in case, here is my best guess as to how you would get it to work on one [noparse][[/noparse]Edit: seems to work for me]

    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
    

    ...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
  • BaggersBaggers Posts: 3,019
    edited 2009-02-07 10:19
    Cheers, Trodoss [noparse]:D[/noparse], and thanks for posting the tips to change for other boards [noparse]:D[/noparse] forgot to mod the movi VCFG instructions too lol [noparse]:D[/noparse] well it is only just finished lol ( but not complete obviously lol will do the changes for that too )
    Thanks again [noparse]:D[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • trodosstrodoss Posts: 577
    edited 2009-02-09 15:37
    @Baggers,
    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
  • BaggersBaggers Posts: 3,019
    edited 2009-02-09 16:01
    Hi trodoss,
    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

    ·
  • trodosstrodoss Posts: 577
    edited 2009-02-09 16:12
    @Bagggers,
    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.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-02-09 16:24
    On the Apple, the high-res byte broke down as follows:

    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!
  • BaggersBaggers Posts: 3,019
    edited 2009-02-10 09:19
    That's gonna be a bugger to do lol,
    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

    ·
  • trodosstrodoss Posts: 577
    edited 2009-02-10 15:20
    @Baggers,
    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.
  • BaggersBaggers Posts: 3,019
    edited 2009-02-10 15:42
    @trodoss, what about a dedicated 16 colour bitmap for top 256(but really 128 fat)x160 pixels, and 4 lines of 32 characters underneath? would be 10K for bitmap leaving plenty for code, and SD buffers etc.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • trodosstrodoss Posts: 577
    edited 2009-02-10 21:27
    @Baggers,
    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.·

    ·
  • BaggersBaggers Posts: 3,019
    edited 2009-02-10 21:44
    ok, whatever you decide, let me know, it should be easy to knock up [noparse]:D[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • KPRKPR Posts: 189
    edited 2009-04-26 23:29
    I am trying to get this work on my ybox2 that does tv video on pins 12,13 add 14.. but after making the changes above.. and run it it just shuts my unit off.. time to get a tv video port onto my protoboard.. but any ideas?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • BaggersBaggers Posts: 3,019
    edited 2009-04-27 06:56
    What changes did you make?
    Can you post what you have now, and I'll test it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • KPRKPR Posts: 189
    edited 2009-04-27 17:16
    I made the changes Trodoss suggested..

    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!
  • BaggersBaggers Posts: 3,019
    edited 2009-04-28 10:29
    How did it go with you're protoboard?
    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

    ·
  • KPRKPR Posts: 189
    edited 2009-04-28 21:49
    Baggers.. I have to retry it.. My issue after pulling my hair out turned out to my video input didn't like the mode .. so it wouldn't display 40x24 but would do 20x13..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • BaggersBaggers Posts: 3,019
    edited 2009-04-30 07:54
    So is it working now? [noparse]:D[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • KPRKPR Posts: 189
    edited 2009-05-01 13:33
    Yes.. like a Charm.. Now its time for me to get off my butt and write something now that I have a working prop environment..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • BaggersBaggers Posts: 3,019
    edited 2009-05-01 15:42
    ok cool [noparse];)[/noparse] and phew lol

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-05-27 00:22
    Baggers:
    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
  • BaggersBaggers Posts: 3,019
    edited 2009-05-27 08:10
    Thanks humanoido, yes we're working on it, just a tad busy with real work though [noparse]:([/noparse] E3 looming

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • ralphwralphw Posts: 2
    edited 2011-02-10 19:33
    In response to earlier threads about the Apple // text and graphics layouts.
    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!
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-02-11 01:41
    ralphw: Welcome to the prop forum.

    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.
  • potatoheadpotatohead Posts: 10,261
    edited 2011-02-11 08:10
    I don't have a Apple right now, but I want one. I think it would be very interesting to put a Prop in there for several reasons. One would be to do the graphics task. That's sweet, and something I think a lot of Apple owners would be interested in. The other would be for a nice dev environment. Kind of big, but it's possible to integrate the Prop with the Apple like what was done with other CPU cards, and the CP/M options.

    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.
  • AndreLAndreL Posts: 1,004
    edited 2011-02-12 21:40
    Baggers,

    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'
Sign In or Register to comment.