6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Apr 26, 2024 7:58 pm

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Sep 17, 2017 3:32 am 
Offline

Joined: Thu Nov 10, 2016 12:28 am
Posts: 13
Hi. My first 6502 related project is now in debugging phase (curse my decision to use 4164 DRAM) and I'm looking ahead to what to do next. I want to do a video-based project, but nobody makes a good VDP chip anymore, I don't want to use an old one, and I don't want loads and loads of 7400 logic chips. I had an idea.

The ATmega644 (and 1284) have just enough pins for a 16-bit address bus, 8-bit data bus, Chroma/Luma/Sync video signals, and a CPU halt and interrupt signal. I looked to the Atari ANTIC chip for inspiration and produced an outline of what I think might work as a VDP for both 6502-based and other projects. I call my proposal DIVA, or Display Interface for Video on AVR. It works off external SRAM to shift out video. Here's my outline on google docs: https://docs.google.com/document/d/1E0yUmSCy42Choiu19xt0XdpP97JAqFmX6pFm4Vy0nH4/edit?usp=sharing

I'm very excited about this idea and I'm thinking of purchasing a 644 and some SRAM to try and make it work. I wanted to check in with some knowledgeable people before I do so to make sure I'm not completely insane. Could this work?


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 17, 2017 6:40 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Thanks for sharing - I haven't read your doc extremely carefully, but surely you can get something like this to work. The more features, the more chance you might run out of something (like time) but I say, go for it, and post your progress!


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 17, 2017 5:06 pm 
Offline

Joined: Thu Nov 10, 2016 12:28 am
Posts: 13
Thanks Ed.

I've decided to hold off on actually building or buying anything until I have a simulator and some test programs. I've got a probably 65% complete 6502 emulator in C and the framework is already there in the program for some sort of video emulation that displays via SDL. I'll try to write the C code as close as possible to what the would actually be on the AVR. I'll get cracking today and see if I have anything simple to post soon from a simulator.


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 17, 2017 6:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
(Be sure to check out your emulator, once written, with a good test suite like for example Klaus's.)


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 18, 2017 4:15 am 
Offline

Joined: Tue Jun 08, 2004 11:51 pm
Posts: 213
You might consider using one of the STM32 parts. You get 32 bit math ( native ) and higher clock speeds. There is already some support through the Arduino IDE if you've already worked with that.
Dwight


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 18, 2017 2:32 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
I've said it before and I'll say it again. You can't beat the Propeller micro-controller from Parallax for video/audio stuff. Especially with retro-based equipment.

Basically, it's a 32-bit uC with 8 cores. Each core is able to generate video or audio. By combining multiple cores, you can even create sprites, scrolling, etc. They all run in parallel.

You could, for example, use one core (called a "COG") to grab a scanline worth of data. Then another COG could apply an offset for scrolling or manipulate bits for a hardware sprite.

It's the closest thing you'll get to programmable logic without actually going to programmable logic.

Yes, I realize people have done lots of AVR based video. But the Propeller has an active community with lots of video (and audio) based drivers. Everything from NTSC/PAL to VGA.

It also has 32 I/O pins and 32K SRAM.

However, it is 3v3 but that can be dealt with.

https://www.parallax.com/catalog/microc ... /propeller

http://forums.parallax.com/

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 18, 2017 9:40 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
But do you think you could do something akin to the Antic and GTIA of the Atari in the propellor? It's been awhile, not sure which chip did the player/missile graphics, which chip did the display list stuff, etc. whether one of them "just did video".


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 19, 2017 2:48 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
I think you could do something similar but maybe not cycle accurate to the *real* Atari chips.

I also believe the Propeller could do a better job than the ATmega644. That chip can do 20 MIPS (on paper) and the Propeller can do ~20 MIPS....PER CORE.....

The only downside to the Propeller is that you have to bit-bang everything. It doesn't have native SPI, I2C, etc. BUT, there are tons of drivers already created for those things and I have yet to find something that can't be done with it (when you compare it to other chips).

Each core (called a COG) has simple video hardware built in....it's basically just a shift register IIRC but it helps with the video generation. But the cool part is that there are tons of video drivers already written. So it's quick to get up and going.

Now, the Atari chips you mentioned are actually pretty advanced. It could take a complete Propeller chip to emulate the ANTIC and another to emulate the GTIA. But then you are still just emulating. That's probably overkill. I would suggest getting a basic display up in ONE Propeller and devote a COG as your "control" COG. The control COG could be used to process very simple "scripts" like the display lists in Atari.

Anyway, it's certainly worth a look if you're serious about video and want to stick with a micro-controller. Propellers are about $8 each (a little pricey but not too bad considering). But all you need is the propeller, an EEPROM I2C chip (to hold the code...the Propeller doesn't have flash memory), a 5MHz clock and a USB to serial adapter.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 19, 2017 3:11 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
I wouldn't say $8 for a propeller is pricey- you get a lot of performance and flexibility for that including a serial bootstrap thing.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 19, 2017 3:16 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
BigEd wrote:
I wouldn't say $8 for a propeller is pricey- you get a lot of performance and flexibility for that including a serial bootstrap thing.


Agreed. Some people complain that $8 is way too much when you can get low-end AVR's for $2 or so. But it's not the same.

There is a LOT you can do with a single Propeller. :-)

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 19, 2017 6:46 pm 
Offline

Joined: Thu Jan 21, 2016 7:33 pm
Posts: 269
Location: Placerville, CA
Yeah, a Propeller literally costs less than the takeout lunch I'm eating right now.


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 19, 2017 9:03 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
commodorejohn wrote:
Yeah, a Propeller literally costs less than the takeout lunch I'm eating right now.

It's the principal of the thing. If you can't do it with 30W of TTL chips, what's the point?


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 19, 2017 9:16 pm 
Offline

Joined: Thu Jan 21, 2016 7:33 pm
Posts: 269
Location: Placerville, CA
True enough :D


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 20, 2017 2:17 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
The costly part about using new hardware instead of what you already have and know is not the hardware itself but the time you need to wrap your head arround the design of the chip and the program language to control it.

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 21, 2017 1:05 am 
Offline

Joined: Thu Nov 10, 2016 12:28 am
Posts: 13
OP here for an update. The specification document is finalized more or less, and I've been working on an outline for a computer to host the display AVR should it ever come to fruition, and a ROM for such a computer. The emulator will target this currently-nonexistent system. I guess my rationale is if I don't have anything to run on the emulator i'll be coding the emulator blind, so the ROM is coming first.

The 16K ROM is nearly done based on the current specification. It has EhBASIC and XMODEM on board, and I'm working on a text display buffer right now. I'm not sure how to scroll text off the screen for EhBASIC but I'm sure I can just start with a single message.

The display routine that it'll boot into is the 2-tone character mode, which I'll attempt to program in the simulator first. The display list program the AVR would read looks like $08,$00,$a0. It's written into RAM by the boot code at start at address $a000. The $8 is 00001000, which signifies two-tone mode then a jump. The vector follows, which leads back to the same operation. This creates a whole screen of the same mode with no interrupts or register changes.

To clarify, the idea of the project is not to emulate ANTIC and the GTIA, but produce a chip of similar capability with a micro-controller program. I'm planning on using AVR because it's what I'm most familiar with, but if the multi-core (I think?) nature of propeller would be more suited to the project I can look into it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: