Shop OBEX P1 Docs P2 Docs Learn Events
More retro video discussion...this time, Atari 800 — Parallax Forums

More retro video discussion...this time, Atari 800

I've been asking a lot of video related questions it seems.  :-)  Sorry, can't help it.  I feel the propeller is the closest thing I can get to a custom IC without going to FPGA (and I have an FPGA board and it's a PITA to get it to work).
Anyway, as in my previous thread (http://forums.parallax.com/discussion/comment/1333528/), I'm wondering how far the propeller can be pushed to emulate the legacy video chips of the 80's.
It seems many have either been emulated or "almost" emulated.  Like the TMS9918.
So today I was wondering what would be the closest driver to the video modes of the Atari 800?  I'm going from memory here, but it seems that it supported 384 pixels per line (320 before overscan) and I think 200 lines (before overscan).  256 colors (newer XL models...128 colors on older models) and 8 sprites per line.  Sprites were, IIRC, 8 pixels wide but could be doubled (fat pixels).  Plus, they took up the entire height of the screen.  They could be split using raster interrupts and the video support a sort of display list (again, raster interrupts) that could do certain things.
Not unlike the copper list in the Amiga (same designers).
I've seen the propeller push some pretty awesome pixels but I'm wondering if it's up to the task of 100% emulation of the 800's graphics?
Because I know it's more than just resolution and memory.  There are some very customized circuitry in those CTIA/GTIA/ANTIC chips.  :-)
Plus, it had a pretty neat (IMHO) way of mixing the two so that one chip was responsible for color and sprites and the other was for generating the pixels.
So, assuming I could throw all 8 cogs at it do you think it could be done?  Would more than likely need external RAM too.
Heck, it wouldn't bother me to put TWO propellers doing it if I had to.  :-)  I mean, what would that cost?  $16 + eprom memory?   LOL
Seriously, what are your thoughts?
Thanks.

Comments

  • A Propeller can do Atari style graphics.

    Many of my early drivers were Atari like in the basic characteristics.  Ataris have a few distinctive attributes in their video:

    1.  Non phase change color.  Like most home computers, color phase change was not implemented to avoid shimmer on text displays.  This also enables artifacting Apple ][ style.

    2.  Pixels aligned to the period of the colorburst.

    3.  Non-Interlaced scan lines.

    I never did emulate the full function of ANTIC + GTIA.  In the end, that complicated doing things I wanted to do on the chip, and that full emulation really only makes sense in the context of computer emulation, which a Prop isn't capable of on it's own.  Or, maybe emulating a 6502 to drive a display similar to how the Atari did it.

    I'm unsure whether or not a Prop can emulate ANTIC + GTIA in the context of presenting as those chips to some other circuit.

    Creating displays that look like an Atari is possible.  The standard video DAC lacks a few grey levels.  Expanding that a little with another resistor or two would replicate the display very well.  The standard Propeller color phase generation is pretty close to what an Atari computer does.


  • That's what I was wondering.  Just simply emulating "Atari style" graphics instead of trying to emulate raw hardware.
    Of course, to make an Atari 800 clone, it would need to respond to the same registers, etc.
    I've just been thinking a lot lately...that if you had a base 65c02 system (CMOS) with 64K of SRAM and proper address mapping, then you have the "essence" of many 8bit computers of the 80's (Apple, Atari, Commodore, etc.).
    Of course, what made them unique was their graphics and sound (and the software that ran on it).  Audio seems to be pretty easy thanks to the various sound cogs.  Which leaves video.  And the propeller can produce very nice video.
    However, it's never that simple in the real world.
    Anyway, I'm not sure I understand what you said about "non phase change color".  Would you mind talking about that a little?
  • "non-phase change color", I believe what Doug is referring to is each scanline is an whole number of colorburst cycles (i.e. 228 cycles instead of the normal 227.5 cycles).  The Propeller doesn't have this limitation.
    The question is what do you want to do?  While the Propeller could be used for emulation, I'd advise against it as the effort required is very high and there are limitations which cannot be overcome (e.g. 32K HUB RAM).
    For games, it's tough to beat the sprite array + tile background system like the NES.  But there's no reason you couldn't create something akin to the ANTIC+GTIA (or the 7800's MARIA).  The base idea is to have one COG reading the display list and generating the pixel data in a HUB buffer which a second COG reads and outputs to screen.

  • potatoheadpotatohead Posts: 10,261
    edited 2015-07-21 16:15
    Yes, I should have included the cycles.  Thanks Eric.  :)

    What that does is stabilize the color.  A big part of that distinctive "Atari" look comes from the "color clocks" all being the same and the pixel clock being directly related, while at the same time having the video circuit actually generate a color signal, not just do artifacting.

    I think the HUB being limited is a problem.  Emulating all those registers in real time, cycle accurate is a non trivial emulation.  Doing simple stuff, like an ANTIC display list, is pretty easy.

    To do an Atari, you've got to do all of it, or it's not going to be very useful.  On the other hand, doing it Atari style could have some real merits, depending on what your goals are.





  • Heater.Heater. Posts: 21,230
    edited 2015-07-21 17:33
    I don't have much knowledge or experience of creating video on the Propeller. Assuming one could create an accurate Atari 800 video system on a Propeller that is sure to leave one problem: Where is the 6502? 
    My ZiCog Z80 emulator on the Prop runs enough of the Z80 instruction set to run CP/M and most of the programs for CP/M.  There are a few instructions still unimplemented because they are almost never used and, well, I moved on from that project.
    Forum member PullMoll did a more complete Z80 emulation for the Prop. search fro qz80 here, which I believe handles all the Z80 op codes correctly. 
    Problem is these use up most of a Prop and require external memory to be attached. So now there is no space for that video stuff. They also are not accurate emulations timing wise.
    One could use another Prop and divide up the work, but I'm guessing the Prop to Prop communication overhead would thwart ones attempts at creating a nice Atari emulation.
    Some guys here were working on a 6502 emulation on the Prop years ago. I always wondered what happened to that effort. I always imagined a 6502 would be smaller and easier to emulate that a Z80.

     
  • Well, for me, I only want to emulate audio and video.  Anything I build (Z80 or 6502) will have the real deal.  I mean, if I'm going to emulate the brains of a computer, why not do the entire thing in FPGA?
    I'm struggling on what my goals should be.  I have so many ideas that I want to work on I don't ever actually start any of them.
    But, if I had to boil it down, I just want to build a "retro" computer (or game console) that can actually play existing software.  I mean, I could always use some of the many propeller drivers and build a 6502 computer with VGA and sprites but there would be no software.
    I'd rather build something like an Apple IIe or ColecoVision, etc. that can actually run existing software.
    I own many of the actual systems.  So it's not about just playing old games.  I just want to learn how to build one of those systems and actually use it.
    And for me, FPGA, Raspberry Pi (running emulator) and/or a PC running an emulator is all the same thing.
    But running an Atari 800 clone with a real 65c02 or an Apple IIe clone with a real 65c02 is a great bridge from the old and the new.  

  • Hi CBMeeks,

    I'm sure you are familiar with some of my projects, so it shouldn't surprise you that I've been thinking of how to emulate some old graphics with the Propeller. I've been dabbling with FPGA too (mostly with the P1V project) but I feel like that's cheating if you want to emulate an old computer. Besides, FPGAs are almost always very expensive, and are in packages that not everyone is capable of soldering.

    There are some examples in OBEX of graphics drivers that use more than one cog. For example one high-resolution VGA driver uses two cogs, which run in sync with each other. One produces a line of video while the other one retrieves data from the hub about its own next line of video to produce. At the end of the scan line, the roles reverse.

    This idea can easily be extrapolated into even more cogs or multiple Propellers. For example, it's not very hard to use four or five cogs and 16 or 18 pins to generate an RGB signal with 65536 colors (and two synchronization signals). But the problem is that you run out of hub RAM and pins really quickly, so it makes sense to run something like that on two Propellers that use the same clock. There are designs of multi-Propeller systems that share a clock; I think for example the Mikronauts Proteus does that (I think it also only has one EEPROM so one Prop boots the other one).

    As for the Atari 800, I don't know enough about it to judge how hard it would be to emulate it. But I've been thinking of designing a 6845 emulator using a Propeller for use with my projects.

    The bottom line is: study some existing code and get inspired :-)

    ===Jac
  • Heater.Heater. Posts: 21,230
    edited 2015-07-21 18:51
    cbmeeks,

    ...if I'm going to emulate the brains of a computer, why not do the entire thing in FPGA?

    Why not indeed. As it happens my Z80 emulation started out as an 8080 emulation, think Altair. That was my first ever Propeller PASM program, I learning exercise as it were.

    I'd also go for an FPGA solution. Love to learn more about Verilog or VHDL. So far I have not managed to find the time or enthusiasm for that.

    I'm struggling on what my goals should be...

    I sympathize. When it comes to hobby projects you are your own boss, and that boss can so easily be attracted by the next "shiny thing".

    And for me, FPGA, Raspberry Pi (running emulator) and/or a PC running an emulator is all the same thing.

    I guess if your aim is running the games and such then how you get it makes no odds. If you actually have to create that environment then there is a world of difference
    between an FPGA and a Pi. Heck I bet there are emulators for all these things that run just fine using Javascript in your web browser.

    Like this maybe: http://zerstoerung.de/jsa8e/
  • Thanks Jac.  Yeah, I am very familiar with your projects.   In fact, if I go with a 6502 system I will more than likely beg/borrow/steal your Propeddle design as a start.
    I have no issues with using multiple cogs or even multiple propellers.  I understand the need to optimize but at the end of the day, if using one more cog makes my life easier then I would.  This isn't rocket surgery I'm trying to sell.  :-)
    The 6502 is my favorite CPU.  I've been programming them for over 30 years.  So I didn't want to do yet another Apple 1 (please, take no offense) because you and Briel have already nailed that one.
    So the next step would be (logically) an Apple IIe.  Especially since it's in my top 5 favorite computers and I own several of them.
    But, the video modes in the Apple IIe are just bizarre.  I wouldn't even begin to tackle the Commodore 64 (my all-time favorite computer) because the graphics and sound in that beast would be too hard (however, credit to Johannes Ahlebrand for the SIDCog).
    There are certain advantages to the Atari 800.  First, I *love* the idea of the display list.  Just like the copper list on the Amiga.  The display list is just basically a "todo" list of commands for each scanline.  Shouldn't be terribly hard to emulate.
    However, like you guys have stated, the various modes of the Atari would be difficult.  But impossible?  Not sure.  Impossible if I tried to emulate the cycle accurate registers...yeah.  But emulating the features should be possible.
    Anyway, another advantage is that I have a copy of the De Re Atari book which is absolutely some of the best reading for computer design (especially related to video) I have ever seen.  So it's almost like I have the cookbook for building an Atari.
    But, this is really a tall order.  Like I said, it's never that simple.
    So I'm back to the beginning.  I think probably the best bet might be to try and build a "Propeddle/Apple 1" replica and slowly see if I can start emulating the quirky nature of the Apple IIe graphics.
    I have been studying various drivers to get a better idea on how they work.  Fortunately, I have a C3 so testing is a breeze.  But the coding is not.  lol
    Sorry to keep rambling so much about this.  I can talk about retro computers and video modes all day long.

  • Heater.Heater. Posts: 21,230
    cbmeeks,

    Sorry to keep rambling so much about this. I can talk about retro computers and video modes all day long.

    Yep, we all like to ramble on. I have been doing a lot of that. At the end of the day it's a case of:

    Talk is cheap. Show me the code.

    As Linus Torvalds said.
  • @Heater
    I understand your reason for emulating the Z80 and I respect that.  :-)  I think it's amazing that it can actually be done!
    But for me, I actually do not want ANY emulation.  If I could, I would call up Commodore and buy a new, mint Commodore 64 that was made in 2015 using the same VIC-II and SID.  :-)
    However, those days are gone.  So what CAN I buy made in 2015?  Well, just about everything except the video and sound.  (well, I'm not counting vintage glue logic or things like keyboards...even though the case was recently made!).
    Unfortunately, there really isn't an easy way to get *any* audio and video on these retro systems these days.  That's actually how I discovered Parallax.  I found years ago that many people were building color circuits with SX microcontrollers.  I even built a few myself with an SX52/48/28.  Then the propeller comes along and that's the closest thing we have for a "drop in" replacement for NTSC video and audio.
    So that's why I'm here.
    I realize I could play games on various software emulators.  I've seen people build portable RPi computers running MAME, Apple emulators, etc.  But to be frank, that doesn't excite me.
    Playing the old games on my i5 desktop or Mac doesn't excite me.
    I do sometimes play these games on the REAL vintage computers (I have over 50).  
    For me, it's about preserving the past with modern *hardware* and learning something new.
    I have an FPGA board at home.  I spent 20+ hours downloading and installing the ISE.  Had to jump through hoops trying to get it to run.  Only to find out I did something wrong and my license can't be found.  After literally spending an entire weekend I couldn't get a simple LED to blink with FPGA.  
    I will learn FPGA one day.  But that's a long time off.  So it's not even an option for me.  I can't imagine how long it will take to build a TMS9918 or VIC-II in one of those.

  • cbmeeks,

    Sorry to keep rambling so much about this. I can talk about retro computers and video modes all day long.

    Yep, we all like to ramble on. I have been doing a lot of that. At the end of the day it's a case of:

    Talk is cheap. Show me the code.

    As Linus Torvalds said.


    LOL.  I love that quote.
    And I'm guilty of it as well.  My problem is that when I get home, programming is the last thing I want to do.  Between wife and kids, my energy is gone.  lol
    Why can't I be 20 again with the toys I have now and the ability to code for 23 hours straight?
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2015-07-21 19:46
    Thanks Jac.  Yeah, I am very familiar with your projects.   In fact, if I go with a 6502 system I will more than likely beg/borrow/steal your Propeddle design as a start.
    You wouldn't be stealing it; I'm giving it away (just mention my name if you use anything, that's all I ask)

    The 6502 is my favorite CPU.  I've been programming them for over 30 years.  So I didn't want to do yet another Apple 1 (please, take no offense) because you and Briel have already nailed that one.
    No offense taken. The Apple 1 just happens to be just about the easiest 6502 computer to emulate.

    I never worked with Apple II's except for a couple of projects in college (mostly using UCSD/P Pascal) so I'm not familiar with them at all, but I understand they have some truly wonky video modes that are basically Woz doing his magic with fewer chips than anyone else would need. Don't they have some weird things like you can't use certain colors next to each other and stuff like that? I don't know how to emulate that kind of voodoo except maybe by putting the Propeller in VGA mode and generating video at really high clock rates that would be interpreted as color in an NTSC decoding circuit. Whether it's possible to accomplish Woz NTSC artefacting color with the composite modes of the Propeller, I don't know.

    I've definitely also been thinking about how a VIC-II from the C64 or the TIA from the Atari 2600 could be emulated but I have so many other things on my plate that I don't expect to have time for it until someone else does it first, anyway.

    ===Jac
  • Heater.Heater. Posts: 21,230
    cbmeeks,

    I'm all for preserving historical artifacts with with modern hardware and learning something new. That was the attraction of ZiCog for me. Learn how to program this weird Propeller chip and use the original source code of those CP/M systems. A tribute to Gary Kildall as it were.

    I'm not sure what I would do with a "mint Commodore 64" or any such machine of that era. Certainly I have no screens in the house that they could display on.

    I'm not sure I would want to be 20 again. All that time consumed with chasing girls and partying. No time for coding.

    Oh wait....
  • Well, we have most of a 6502 emulation in the NES project. It is missing decimal mode.

    If you are looking to duplicate features, but not be cycle exact, a Prop may work very well.

    Are you going to program this beast yourself, or maybe port stuff?

    Honestly, the Apple 2e may be easier in some respects. It has no active systems. All you really gotta do is scan memory. A Prop has room for both pages of graphics in its HUB too.

    And, tricks with soft switches aside, there is no real requirement to sync the display cycle accurate. Most things will look fine. Your Prop would need to scan memory the 6502 can see and put it into the Prop HUB for display. That display will need a couple COGS to sort out the weird pixels, and then display them. No sprites, etc....

    But if you are planning on programming it yourself, that display is some thing else to work with. Good news is you can find 6502 routines to do it and just call those.

    Atari style would be much easier in that respect.

    You could go further and just make a good display optimized for the 6502 and program to that too.

    Back in the day, Williams did this on their arcade machines for 6809. The video memory was setup to be just sweet. That is how something like DEFENDER happened at a mere 1mhz.

Sign In or Register to comment.