6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 05, 2024 9:05 pm

All times are UTC




Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Mon Dec 26, 2016 7:20 pm 
Offline

Joined: Tue Nov 10, 2015 5:46 am
Posts: 215
Location: Kent, UK
Oneironaut wrote:
Nice. Care to share the schematics and code? It would be fascinating to see how you did that.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 26, 2016 7:32 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 632
Location: Gillies, Ontario, Canada
I don't want to get too much into AVR code here, but someplace on AVRFreaks I posted this one and many of the other AVR based Video projects I have done over the years.

http://www.avrfreaks.net/forum/quark-85-demo-kube-184-x-240-vga-8-colors-and-sound-tiny85

I have actually inproved Quark-85 a lot since then, and will also be doing proper documentation when my new site comes alive.

Brad

sark02 wrote:
Oneironaut wrote:
Nice. Care to share the schematics and code? It would be fascinating to see how you did that.


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 26, 2016 9:37 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 632
Location: Gillies, Ontario, Canada
Waiting for drywall mud to dry... half an hour of free time!

I finally settled on a good compromise between the minimal available SRAM and a graphics mode.
Using just under 13K, I made a fully bitmapped 216 x 120 mode that can display 16 colors at once.

The DAC is just 6 resistors setup as R-G-B-I. The "I" bit is intensity, so there are 2 shades of 8 colors.
This is quite similar to the C64 Palette. Pixels are packed in nibbles, so 1 byte equals 2 pixels.

Here is a converted image along with the full 16 colors that can be displayed...

Image

The previous block mapped video memory was just way too limiting to do anything fun with.
This new video display mode will be fast enough for decent games or demos, as well as text.

Here is the original image for comparison. ..

Image

Here is the memory map showing how the 6502 will use the available RAM and ROM in the AVR...

Code:
// VIDEO MEMORY FROM 00000 TO 12959 = 12960 BYTES
#define VIDMEM RAMSTART

// 6502 ZERO PAGE MEMORY FROM 12960 TO 13215 = 256 BYTES
#define ZPAGE RAMSTART+12960

// 6502 STACK MEMORY FROM 13216 TO 13471 = 256 BYTES
#define STACK RAMSTART+13216

// 6502 SRAM MEMORY FROM 13472 TO 16383 = 2912 BYTES
#define SRAM RAMSTART+13472

// 6502 ROM MEMORY FROM 16384 TO 65535 = 49152 BYTES


I now have the 6502 coming up and running the infinite NOP test, so this is a good start.
Next step will be to get the 6502 to tristate right before the video rendering loop steals the memory.

Not much more time to play today though.

Later,
Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 26, 2016 10:41 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 575
sark02 wrote:
Oneironaut wrote:
Nice. Care to share the schematics and code? It would be fascinating to see how you did that.

I'll + 1 the kudos on that demo!


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 2:56 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 586
Location: Michigan, USA
Oneironaut wrote:
I now have the 6502 coming up and running the infinite NOP test, so this is a good start.
Next step will be to get the 6502 to tristate right before the video rendering loop steals the memory.

Are you stopping the 6502 while outputting video lines?


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 8:26 am 
Offline
User avatar

Joined: Thu Jun 23, 2011 2:12 am
Posts: 229
Location: Rancho Cucamonga, California
My L-Star system can emulate an Apple-1, or an OSI superboard II (also known as uk101), or it can be some other computer you design by writing firmware. It uses 3 chips: WDC 65c02, Propeller and the EEPROM that holds the Propeller firmware. It's the successor of Propeddle which was already mentioned above.

It generates monochrome video and uses a PS/2 keyboard but you can also use the serial port for interaction. You need a Prop Plug (FTDI chip) to download the firmware but once it runs, it can do without. So that shouldn't count as a needed chip.

I'm not that interested in sound so none of the current documentation suggests any way to generate sound, but if you insist, it should be trivial to connect a speaker to the pin that normally does the keyboard clock, and use the single-pin keyboard driver.

With the Apple 1 emulator firmware loaded, there is space for 24KB ROM/RAM, depending on how you want to configure things. I use the 8K ROM image from Vince Briel's Replica 1 which has Ken Wessen's Krusader (interactive assembler/disassembler) and a BASIC interpreter (either the original Woz BASIC or the one from Microsoft). So that leaves 16K of space in the Propeller that can be addressed from the 65c02 as RAM.

I also sell this on Tindie as a kit, called the L-Star Plus, with an additional 128K SRAM chip, power supply circuitry and an expansion port. But the simplest version of the project can be built on a breadboard or a Propeller prototyping board.

Https://hackaday.io/project/3620

===Jac

(By the way, a 2-chip design with an atmega 1284 has been done before too, it's somewhere in the Hardware subforum here on 6502.org. Sorry I don't have time to find it right now).


Last edited by jac_goudsmit on Tue Dec 27, 2016 8:48 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 8:40 am 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 485
Location: Switzerland
Hi Oneironaut

I did not see any input device required on the initial bullet list :? Also in such a challenge I would not allow the use of microcontrollers, because it ends at a challenge how to squeeze most out of a microcontroller and not how to make a 6502 based computer.

Your other goal to have a simple computer for beginners has a valid point, but then you also could just go for an emulator.

Cheers Peter


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 3:38 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
whartung wrote:
Personally, getting a 6502 up on a serial terminal with some discrete logic, and a monitor ROM, would be far more "satisfying" for a hobby project. You'd have the primary components of a "computer" all sitting out to be wired up and pointed to with a pencil. "Here's the CPU, here's the clock, here's the decoding logic, here's the RAM, and the ROM and RS-232 chip".

Having a CPU chip and an "everything else chip" just...loses something for me. Doesn't seem like much of an accomplishment. "Exercise 1: wire up an LED to a battery. Exercise 2: wire up a 6502 to Big Black Box and plug in a monitor". It's like those "How to draw Skippy" lessons, where lesson 1 is a circle, and lesson 2 is "fill in the circle to look like Skippy".

I love your display, grats on getting all that to work, but a 2 chip solution that results is such a sophisticated device, IMHO, misses something.


I agree with this 100%.

I don't want to diminish the accomplishments of Oneironaut. He is certainly a very smart person with lots of achievements under his belt. But, I must admit, I am guilty of thinking like him sometimes.

Take, for example my "yet to be announced" M32 project (I have tons of projects that aren't announced :-D )...I've been thinking for the last two days on how I was going to get a 3V3 micro-controller to work with the 5V only EEPROM that I have. It's a problem that isn't too difficult to solve. Lots of ways to solve it. It's for the video system I am working on.

But after reading your post...it reminded that I am solving the wrong problem. I do that a lot. Solve problems that shouldn't be a factor at all. My M32 computer was to have great video as well.

The very point of my M32 project was to be a retro computer....with hundreds of sprites and VGA display....6 SID chips (via emulation)...etc. But is that really a retro computer any more?

IMHO, the NES and C64 pushed the practical limits of what 8 bit machines should be. These days, it's possible to build 8 bit machines with XBox like graphics and sound. But it just isn't a good fit. At least not for me.

I'm going to rethink some of my projects and make them a better fit (for ME). I think building my vision of a retro computer with a good foundation that can be expanded on is a better solution.

But either way, I'm still impressed with Oneironaut's work.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 3:51 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 632
Location: Gillies, Ontario, Canada
Some answers...

Micheal : Yes, the 6502 clock is held while the AVR takes over to draw a horizontal line of video.
The AVR is really acting like a VIC chip, a RAM, and a ROM.

Jac : Very nice project with a lot of effort into software. True about it being able to do sound as well.
If you find the link to the sinlge 1284 project, I would certainly like to check it out.

CBSCPE : An input device (beyond the ability to load 6502 code) is optional. I may just use this for demos.
It can however read C64 (9 pin) or SNES type (serial) joysticks as it is right now. I will probably add the later.

CBMeeks : Thanks! Your work is also very inspirational. There is a LOT of talent here!

I should also explain my motivation for this time waster a little more in depth, since there was a lot more response than anticipated!

I love to push the limits of hardware and software, and for me the ONLY way to truly enjoy the results is to see and hear them.
I have less than zero interest in seeing bland text on an LCD or seeing "Hello World" come off a PC connected terminal emulator.
Seeing a great 6502 project not generate color video and sound to me is like a seeing a completed house with chipboard still showing!
I also don't enjoy emulators at all. If I can't see a REAL 6502 running, then I wouldn't even bother doing any of these projects.

Having said all of that, the final reason for actually finishing this project (I actually started in 2007) is because of response from this forum.
I have had a non stop flow of email to my email on both the Vulcan and Fusion projects once they were picked up around the web.

The most common 2 comments I received basically sum up what I though was just my own perception of starting with a 6502...

1) It's too damn difficult to just get started!

I came here a decade ago and wanted to jump into retro computing, but could not find many projects that didn't require odd or hard to find parts.
ROM... now thanks! Ebay parts... no way! Hard to find obsolete logic... forget about it!
Seems others just want to spend a minimal amount on easy to find parts (less than $50) and drop a few wires on a breadboard.

2) The results are just too damn lackluster!

I guess I think like the original VIC-20 team... if it can't do sound and color then it's just not fun!
It was great to see so many emails from people claiming the same thing. I though it was just me, but perhaps not.
Every bit of code I have ever done on any platform was target to either sound or graphics. It's just the best way to see your work.
A monochrome LCD with a poor refresh rate just doesn't turn my crank!

So that's my motivation for finally finishing this thing.
With the introduction of the AVRISP-II, doing this project is very affordable.
My PC to 6502 Binary converter also makes coding and loading a 10 second operation.
For a purest like me, I MUST see the results on a real 6502!

Anyhow, that's me reasoning (or lack thereof) for doing this holiday hack!
There will be late nights and alcohol involved for the next 2 weeks, so progress may be unstable like a bus collision.

Cheers!
Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 5:22 pm 
Offline

Joined: Tue Nov 10, 2015 5:46 am
Posts: 215
Location: Kent, UK
Oneironaut wrote:
I love to push the limits of hardware and software, and for me the ONLY way to truly enjoy the results is to see and hear them.
I have less than zero interest in seeing bland text on an LCD or seeing "Hello World" come off a PC connected terminal emulator.
I get that 100%, and coming from the home computers of the 80s, I agree.

I took a look at the avrfreaks page you pointed to, and it's all very impressive. You seem to have a strong intuitive grasp of the analog side of digital systems, well... at least compared to me... In that domain I'm a monkey in a cage throwing feces at the wall (NEW ACHIEVEMENT: Too Much Information).

Composite Sync was new to me. I liked the story of the French guy who thought you were a fraud, and so certain of his position.

A good read. Thanks for the link.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 6:02 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
sark02 wrote:
...I liked the story of the French guy who thought you were a fraud, and so certain of his position.


Now that's a story I'd like to read!

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 6:21 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 632
Location: Gillies, Ontario, Canada
Thanks!

Yeah... that guy!
He was a character.

This is the link that spawned his claim that I simply faked everything I ever did...

http://hackaday.com/2015/12/17/attiny-does-170x240-vga-with-8-colors/

It was a compliment for sure. Disbelief always is.

Brad


cbmeeks wrote:
sark02 wrote:
...I liked the story of the French guy who thought you were a fraud, and so certain of his position.

Now that's a story I'd like to read!


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 7:51 pm 
Offline
User avatar

Joined: Thu Jun 23, 2011 2:12 am
Posts: 229
Location: Rancho Cucamonga, California
Oneironaut wrote:
Jac : Very nice project with a lot of effort into software. True about it being able to do sound as well.
If you find the link to the sinlge 1284 project, I would certainly like to check it out.


This is the project I was referring to: Mike ("Michael") McLaren's "K8LH Pocket 6502 SBC". Sorry, I remembered it wrong, it actually uses 3 chips, not 2 (the third chip is an SRAM chip), and the microcontroller is a PIC, not an ATMega. No video or audio (serial only) but I reckon it might be possible to use those address decoder outputs of the PIC for audio/video, with some smart programming. And he designed a neat circuit board too.

Obviously whenever you generate video with the microcontroller, you usually end up with a somewhat crippled design because there's only so much that a microcontroller can do at the "same time", so you end up making the 6502 wait when the MCU is busy generating video. With a Propeller however, that's not a concern: it has eight cores that work simultaneously, and it has instructions to help generate video as part of the design.

===Jac


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 8:16 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 485
Location: Switzerland
So where do we stay at the moment? As far as I have understand there are 9-chip version's and a 3-chip version that however stops the 6502 during video output. I could also throw in my 9-chip ROMulus the 1st, built completely with DIP and mounted on a breadboard http://forum.6502.org/viewtopic.php?f=4&t=3458&hilit=romulus. It does not have a sound output, but there are two options. One is reprogram the GAL to provide a output that can be toggled instead of the two IO select pins or you could add software to the AVR to interpret portion of the dual-port RAM as audio buffer.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 27, 2016 8:22 pm 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
sark02 wrote:
Arlet wrote:
Here's a [single chip computer] nice one done by Linus Åkesson 8 years ago.
That's insane. It reminds me of the Atari ST demo scene from the 90s, and what those teams (mostly European) could make the machines do. Saying it's "very impressive" isn't even beginning to do it justice.


Quite impressive! So if we think of a 65C265 microcontroller with 65C02 built-in... a one-chip solution to this problem could be possible? :shock:


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

All times are UTC


Who is online

Users browsing this forum: Dr Jefyll and 11 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: