Quark-85 Demo Kube - 184 x 240 VGA with 8 Colors and Sound on an Tiny85!!

Go To Last Post
438 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Greets Freaks!

It has been a long time since I had a free weekend to hack away on my favorite uC, but today I took out a small breadboard, a few resistors, a VGA connector and decided to see where things would go.

The original plan was to just bit bang some mono VGA and do up a Pong or Tetris game, but things went MUCH MUCH further than I ever thought possible, so over the next few weeks I will detail this fun project here. I call it The QUARK-85 VGA DEMO System.

So what can one do with an ATTINY-85 and no other external components, an 8 pin package that leaves ONLY 4 IO lines after you feed it a clock??

How about 4 color rock solid VGA with stereo sound!!!

I kid you not, with only 4 IO pins, this little AVR pulls it off. Now if you consider the fact that you need a minimum of 4 IO pins just to make any amount of color VGA (H-Sync, V-Sync, Red, Green), it baffles the mind as to how it can also do stereo sound, since the pin count would now be at 6 IO lines.

Oh, and my constraints were to use NO other external components besides the clock oscillator, and a few passives such as resistors and diodes.

This project is probably my favorite of all my video hacks, since it seems to do the impossible. The VGA signal is following the 640x480 standard exactly, and there is no jitter at all.

I also did the video core in assembly, but do all of the fun stuff in C, so it is really easy to make demos on this little hack by just calling the routines. The programmer does not have to worry about interrupts or any kind of odd timing at all.

Currently, the system supports 3 video modes, with various features and resolutions. Since there are only 512 bytes (yes bytes!) available in the T85, a lot of trickery went into the assembly routines in order to display color bit-mapped graphics, text, lines, circles, etc.

Sound is pretty basic, just a right and left channel that can play a note with a frequency between 0 and 10KHz, but it's enough to play music.

I am going to clean up the routines and make a few cool demos in C before I release the project here, and will add to this thread each time I make a little more progress.

Anyone want to venture a guess as to how an ATTiny85 with 4 free IO pins does rock solid 4 color VGA and stereo sound without any other components besides 2 diodes and 6 resistors?

Cheers!
Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Sat. Jul 30, 2016 - 08:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

With some overclocking for starters :)

Tiny85 Maximum Clock Frequency: 20 MHz
VGA 640x480 : 25.175 MHz

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
With some overclocking for starters :)

Tiny85 Maximum Clock Frequency: 20 MHz
VGA 640x480 : 25.175 MHz

Yes and no. Yes, I am running the T85 at 25.175Mhz, but it can do the same thing at 20MHz. In fact, the original version was running at 20MHz, but I thought it would add to the coolness to push it up a little! Both the 20 and 25.175MHz version report 640x480@60Hz on any VGA monitor.

I forgot to mention, that this system is not a "chasing-the-beam" type of system, each video mode is bit-mapped to the internal SRAM in a sneaky kind of way.

In one mode, I get an effective resolution of 192x120 pixels and can draw text, shapes, and even 4 color sprites at 60 frames per second flicker free. The colors it can generate are black, green, cyan, and purple (all onscreen at once).

Sampled sound is also possible, but it eats so much progmem, that I took out the routines.

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Mon. Sep 9, 2013 - 12:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How? Well, that Atomic Zombie fellow figured out something amazing on a day off.

Sheesh, it took me all summer to get a TFT display to say "BarefootElectronics.com."

Waiting excitedly for details.

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sweet Jeebuz!

AtomicZombie wrote:
Anyone want to venture a guess as to how an ATTiny85 with 4 free IO pins does rock solid 4 color VGA and stereo sound without any other components besides 2 diodes and 6 resistors?
You mean you're using an external crystal? Or an external clock...

Using an clock would buy you a 5th pin, but I guess that would be cheating ;)

I'd hazard a guess that you're somehow piggy-backing onto the HSYNC @ 31.4686 kHz, but I can't figure out how you might do that without breaking the VGA standard... and how you'd get two audio channels out of that, I don't know... unless you can do something similar with VSYNC as well...

I'll bet the diodes have something to do with it ;) ... and maybe some clever use of DDRB... but I'm too tired to think it through now... big day tomorrow, off to bed...

Really looking forward to following this project!

JJ

[edit] Wait! Do you use the red and green lines for audio during horizontal blanking? Each tied via a diode to the HSYNC line? I'll post a schematic if I can figure it out... likely not until Wednesday before I'll have time... I bet someone else will beat me to it ;) [/edit]

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Mon. Sep 9, 2013 - 04:24 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Each output is tri-state: low, float, high (and pull-up, but it's a weak one so probably not enough current for anything useful without an external amplifier). With two diodes (and two resistors), you can split one output pin into two channels:

out     left    right
---------------------
low     low     low
float   high    low
high    high    high

This leaves three output pins for VGA. You'd use sync-on-green, so these can do RGB and I believe need no sync lines. I think the sync pulse is negative, so you might float the VGA output's ground so that you can output the negative pulse.

I imagine that you took a different approach, though, since there are probably lots of ways of going about it, and I'm not very familiar with the AVR series yet.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
out     left    right
---------------------
low     low     low
float   high    low
high    high    high

And what about left@low and right@high?

Quote:
You'd use sync-on-green
Not part of the VGA specs (I believe), but a good idea. I have a couple of monitors capable of SOG kicking around.

These would fall under:

Quote:
clever use of DDRB
... and are good ideas in their own right, but I would sooner apply them to the two colour outputs to achieve 8 or 9 colours instead of just 4. Since PORTB and DDRB are separate I/O registers, timing would be a biatch...

OK... really... bed...

[edit]
OK, quick one before I go off to work for 13 hours...

If you are using SOG, and are only using two outputs for colour (green and red) with a little resistor-based mixing to get cyan and purple (magenta?), then you'd really need only two outputs for video, leaving two for audio...
[/edit]

JJ

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Everyone is on the right track here. Before I reveal the secret, here are the constraints...

- After applying a clock input from the external clock module, the Tiny has only 4 inputs available, not 5. You could theoretically have 5 IO, but that would mean the loss of programming ability unless you have some strange beast called an HV programmer. So I am working with 4 free IO pins.

- I am driving H-sync, V-sync, Red, Green, Audio-L, and Audio-R, so there are 6 outputs being used to the monitor and speaker system.

- Sync pulses sometimes overlap (when V-sync is active), and audio signals happen on every single line, at 31.5Khz. The red and green color signals occur during the active frame time at a rate of up to 5Mhz, and must be off during the blanking periods.

So, a LOT of magic must happen to satisfy all 6 outputs using only 4 AVR IO lines!

Getting 192x120 color VGA out of a 512 byte uC without resorting to line chasing was also a chore, but I managed to do it so that the main loop (done in C) can just call all of the assembly routines without the need to understand VGA timing, interrupts, or any strange memory sharing.

Commands like this are available...

DrawLine(x1,y1,x2,y2,color);
PrintText("AVRFreaks!",x,y);

The system also supports flicker free animation by including an auto syncing routine that locks to the refresh rate of the video driver.

Will post the schematic next.

brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brad, once again you did it !
You should be honoured with the title "AVR Magician"

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"AVR Magician" would seem a minor title compared to "Atomic Zombie."

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Too many kind words for my hacks!

Here is the schematic. This should give away the secret of 4 pins acting like 6...

Code and demo videos to follow.

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not run the chip from the intern clk :)
You should be able to run it at a bit higher than 20MHz (datasheet say max speed for PLL is 85MHz, and the chip can run at 1/4 of that

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Tiny PLL will allow 16MHz max. Even worse is the incredible amount of jitter present when using the int. osc. It is so bad that VGA will fail to lock and on my NTSC tests, the image was very badly line shifted.

The XMega on the other hand has an amazing PLL

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And, of course, "Anybody" could do it with an xMega. The Zombie challenge is to do it with an tiny 85!

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok thanks for the info. But I'm surprised it's that bad since it's a 64 MHz div with 4.
When you say max 16MHz is that because the CPU don't work with a PLL of 80MHz, or the PLL don't lock at that freq ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Amazing!

If you're driving blue and red together, it seems to me your palette would be:

        R   G   B
-----------------
Black   0   0   0
Green   0   1   0
Magenta 1   0   1
White   1   1   1

Where does cyan come from?

I'd guess from your schematic that you drive R and G by manipulating the internal pull-ups on PB0 and PB1, and HSYNC and VSYNC by driving PB0 and PB1 low (by setting PORTB0 and PORTB1 low and manipulating DDRB0 and DDRB1).

This seems to imply that your VGA monitor has high-value pull-down resistors on the colour input pins. Is this part of the standard?

JJ

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I believe the VESA standard states that the analog lines are 75 ohm terminated at both ends. I have tested this project on 4 monitors of various age / brand and the video looks the same on all of the so far.

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes indeed, some sneaky twiddling of DDRB is the key to doubling up the color and sync lines.

There are 4 states available; high drive, low drive, Z pull and Z floating. When the video driver interrupt begins, I drive low to initiate the sync pulses. During the sync phase, all of the frame calculation and memory management happens as well as the right and left audio mixer. Audio pins are driven either high or low, so that part is easy.

When sync ends, I set those pins to Z with pullups initiated so that a single OUT can be used to determine the 2 bits of color. I do a little AND and OR logic before the active video line to determine the state of the entire PORT, so that the audio is not effected (each audio pin may be high or low at this time).

To send color data, DDRB is set, and since the PORT reg has 1s written to the color PINS, this either drives them high or back to Z, so sync is not affected thanks to the diodes.

There is some other magic in this fun project, which I look forward to sharing as well... interrupt latency removal using 2 8 bit timers.

Here is a preview...

I set my interrupts in C like so...

/////////////////////////////////////////////////////////////////////
////////// SETUP TIMER 0 - VIDEO INTERRUPT TO 800 / 8 = 200
/////////////////////////////////////////////////////////////////////

OCR0A = 99;
TCCR0A = 2;
TCCR0B = 2;
TIMSK = 16;




/////////////////////////////////////////////////////////////////////
////////// SETUP TIMER 1 - ANTI JITTER SYSTEM
/////////////////////////////////////////////////////////////////////

PLLCSR = 0;
TCCR1 = 129;
GTCCR = 0;
OCR1A = 0;
OCR1B = 0;
OCR1C = 4;

Now since a 640x480 VGA line requires 800 clock pulses, I have to prescale since the Tiny does not have 16 bit timers. So I divide by 8 and set it to 200.

This is all good, but to make a working video system you CANNOT have even 1 cycle of jitter throughout an entire frame of 420,000 cycles. Yes, that's 420k cycles (800 x 525) with not a single missing or extra cycle! And since the AVR interrupt system is not predicable beyond 4 cycles, something has to be done.

In my large projects, I just made a simple routine to check the timer value and delay based on the interrupt entry in order to equalize the latency, but with a divided clock, this is not possible since the resolution is 1/8 of the real value.

So to combat this, I setup a second timer to run in phase with the prescaled timer, but at 1 cycle resolution, wrapping at some divisor of the main timer. Now I can use the reference timer to simply adjust plus or minus 4-5 cycles on the interrupt entry in order to remove all jitter...

// VIDEO INTERRUPT ENTRY POINT (4)
.global TIM0_COMPA_vect
TIM0_COMPA_vect: ;4

// SAVE STATUS REGISTER (3)
push r16 ;1
in r16,SREG ;1
push r16 ;1

// ATOMICZOMBIE JITTER FIXER (11/16)
in r16,TCNT1 ;1
cpi r16,0 ;1
brlo FIX0 ;1/2
FIX0:
cpi r16,1 ;1
brlo FIX1 ;1/2
FIX1:
cpi r16,2 ;1
brlo FIX2 ;1/2
FIX2:
cpi r16,3 ;1
brlo FIX3 ;1/2
FIX3:
cpi r16,4 ;1
brlo FIX4 ;1/2
FIX4:

Works perfectly!

But this leaves no more timers, so I had to bit bang the 2 audio channels in coded during HSync.

I will be posting the entire system and code with a line by line explanation of how the assembly coded video engine works and how to use the C graphics routines to make cool demos.

Quark85 is certainly no power system, but it can do some cool stuff on screen and play polyphonic music. It will be a fun project to learn to code on, and I hope to do up some spiffy tutorials on using GCC and assembly together, something that I have found to merge the best of both worlds.

Just have to finish up a 5x5 character set, make a few more C routines for musical notes, lines, sprites, and special effects. Next rainy day, I will start adding some real code.

Cheers!
Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're mad! Stark raving mad!

And I've GOT to build one of those! I even have an old vga monitor sitting here.

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Shame you can't read the prescaler register.

Quebracho seems to be the hardest wood.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sanity is highly overrated!

Yes, if we could read the prescaler counter, then when dealing with timing critical interrupts, one could deduce the cycle count by adding back to the timer value. Now that would indeed be a useful thing. It would be almost as good as just having a 16 bit counter to start with.

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The other trick, that you are almost certainly aware of, is to put the AVR to sleep, just before the interrupt. This guarantees a fixed latency, but would involve a lot of cycle counting in H sync to know when to go to sleep mode.

Quebracho seems to be the hardest wood.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, that works well, but then forces the "C side" to become aware of timing in the "ASM side". It would require drawing all graphics during hblank and then hitting sleep before the start of the interrupt. I did add a C routine that can wait and sync with a certain vertical line (000-524), but this was done so that sheering could be eliminated on moving graphics if the main loop just happened to extend beyond a single refresh rate.

Hmmm... sounds complex, but in reality the programmer only has to issue graphics commands and my vid engine takes care of the rest.

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:
I believe the VESA standard states that the analog lines are 75 ohm terminated at both ends.
[facepalm]... right!

AtomicZombie wrote:
To send color data, DDRB is set, and since the PORT reg has 1s written to the color PINS, this either drives them high or back to Z,
[facepalm]... I imagined it backwards. I thought you would use Z and Z with pull-up (which might have worked with high-value pull-downs) ... because I'd forgotten about the 75 ohm termination to ground...

Genius!

JJ

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

any hope to get the example code ?

 

 

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greets again Freaks!

I often put my projects on the shelf while life keeps me busy, but nothing is EVER really finished.

In this case, I had a few hours to spare, and decided to work on my ATiny VGA system for a bit.

To be honest, this one is probably my favorite of all time, right next to my latest giant breadboard project.

 

Anyhow, I made the ATiny do something that even I would have claimed to be impossible!

With only 512 bytes of SRAM and 4 usable IO pins, I made the ATiny do this...

 

8 Color Bit-mapped VGA at 170x240 resolution!!!!!

 

I know... absolutely impossible! I would say the same thing.

How can a processor with only 512 bytes  crank out an image that would require over 40Kilobyes of SRAM?

 

Not only is it doing this, it can move multiple hi-resolution sprites around the screen and display a perfect signal.

This is not a tile engine, as sprites and graphics are able to be any size, and even overlap.

 

I look forward to finishing this up and making some demos to show.

 

The old version was also bitmpaped, but only managed to crank out a 72x48 image with 4 colors...

 

https://www.youtube.com/watch?v=8Z5Gcl8Py7Y

 

The new version is now doing 170x240 with twice as many colors!

 

Ok, back to my yard chores!

Talk at y'all soon (with proof of this claim!)

 

Brad

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Sun. Dec 6, 2015 - 07:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

32 MHz.

 

Brain.  Hurts.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who needs ARMs or C .......

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

How can a processor with only 512 bytes  crank out an image that would require over 40Kilobyes of SRAM?

 

Very impressive!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I STILL have to try this. Needs a CRT monitor, or will LCD do?

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Thanks freaks!

 

Works on any monitor. VGA standard is held perfectly (640x480 60Hz Spec).

 

You will require a HUGE bill of materials...

 

1 - ATTiny-85

1 - 32MHz Osc

3 - Resistors

 

That's all so far!

I will probably add an ADC Joystick as well to make some games. This will add 1 more resistor and a POT.

 

I will post more when I get  break.

 

Cheers!

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Impossible? https://mitpress.mit.edu/books/r...

 

One of the many retro books in my library, and a good one to read!

 

Stella had some advantages over the ATiny, though.

Perhaps I will try to knock-off some of the VCS games on this thing!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've not read it myself. With the Atari the stupid blinking was a tradeoff. Along with the blocky graphics what was good at the time, then as technology progressed it was seen to be bad, now when its 'retro' its good again!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Some people make walking on water look so easy...

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the comments!

 

As promised, here is proof of my incomprehensible claim of 170x240 Color VGA spewing out of a 512 Byte ATiny...

 

https://youtu.be/rmx-2fTxsns

 

Sorry for the boring demo, I didn't have time to do anything cool just yet.

The "Sprite" is 100x80 with 8 colors!

Multiple Sprites can be drawn, complete with overlapping and alpha pixels.

 

Video is 100% solid at 60 frames per second, and the monitor locks to 640x480.

I also plan to add sound and a joystick... seriously!

 

Not bad for a 512 Byte ATiny with only 4 IO pins.

 

Out of all of my AVR projects, this one moves my insanity up a level.

Although programming a demo / game is easy, the Video Driver was something else.

Line syncing, dual on-the-fly buffering, realtime mixing, dual timer jitter fixer, etc.

 

I think this one is now my favorite.

Will do up a few demos to really show what this little banger can do soon.

 

Parrot image swiped from here... https://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_palettes

 

Cheers Freaks!

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Mon. Dec 7, 2015 - 08:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

Kartman wrote:
Impossible? https://mitpress.mit.edu/books/r...

 

One of the many retro books in my library, and a good one to read!

 

Stella had some advantages over the ATiny, though.

Perhaps I will try to knock-off some of the VCS games on this thing!

 

Brad

I wrote a game for the Atari 2600 a long, long time ago. It was crap. The game, that is, not the console.

 

Quebracho seems to be the hardest wood.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will assume that the sprite are placed in flash (3k), and not compressed in 512 byte of RAM or ?

Last Edited: Mon. Dec 7, 2015 - 02:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I may as well go back to swinging a wrench and climbing ladders for a living.  I will never measure up around here! ;-)

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will never measure up around here! ;-)

Come back to the dark side.....forget C....

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I must make a correction to my claim, as I don't like misleading anyone.

I had originally claimed that I could do 170x240, but after a few "tweaks", I realize that this number is not correct.

 

Yeah...., it's blasting out 216x240 now!!

 

This is now the highest resolution color image I have ever made out of an AVR without needed external SRAM and supporting hardware.

Funny that it would be a 4 IO ATiny with 512 bytes of SRAM!

 

Can't wait to do something to show off the graphics capabilities of this Microscopic Retro Powerhouse.

Just have to figure out the best way to make sound now, as all IO Pins are in use...

 

// SETUP ATTINY-85 IO PORTS
sbi DDRB,0 ; COMPOSITE SYNC
sbi DDRB,1 ; RED COLOR BIT
sbi DDRB,2 ; GREEN COLOR BIT
sbi DDRB,4 ; BLUE COLOR BIT
cbi DDRB,5 ; JOYSTICK ADC

 

Pin B.5 is actually not a "real" IO, as it is taken up by the reset function.

I found that I could "trick" the ADC to use this pin by holding it above 2.5 volts.

 

For sound, I may try some "way out of the box" trickery, like amplifying the noise from the ADC pin as I switch internal modes or something wonky like that.

 

I like this project so much, that I may fabricate a microscopic replica of an Atari 2600 cabinet to put it in.

 

Anyhow, will post something more interesting to look at soon.

 

Cheers!

Radical Brad

 

 

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We are unworthy.

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agreed. Amazing what he can do with an AVR.

yes

 

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't wait to try it.....  sounds like a Wozniak award for sure.

 

David

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you pushed the limits of text display?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It may be a while before I can post the demo I started.

I upgraded Studio and my computer imploded.

Trying desperately to fix it now.

 

Spent the day killing my laptop...

https://www.avrfreaks.net/forum/atmel-studio7-problems-help-viewer#comment-1733436

 

When I do manage to get the AVRISP to work again someday...

 

My next ATiny Demo will be a game I call "BONG".

This will be a fusion between Pong and the Amiga Boing demo.

Yeah... spinning checkered balls with joystick control on an ATiny!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Tue. Dec 8, 2015 - 09:27 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pick it
Pack it
Come along
And take a hit from the BONG!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My next ATiny Demo will be a game I call "BONG".

Ohhh I thought it was named after the sound of you computer after "upgrading" to AS7!

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm. AS7 went in smoothly here. You'll conquer it, perhaps with a Tiny10 to do the makes.

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:

Hmm. AS7 went in smoothly here. You'll conquer it, perhaps with a Tiny10 to do the makes.

 

My AS7 went well the first time as well, but apparently it was a Beta, and had no option to get assembler help files downloaded.

I am still running the Beta in my Lab, afraid to go through that hell again.

I printed the assembly cycle counts on paper instead!

Kind of funny, I have them all memorized now anyhow, just couldn't remember the XMega use of LD and it's cycle cost.

 

On my Quark-85 Project, I now have the Amiga Boing Ball spinning on the screen!

It's crazy to see an ATiny pulling this off. The Sprites are 44x60 in size with 8 colors!

 

Will be adding the Joystick soon, and then trying to extract sound from it somehow.

With all 4 IO in use, this should be fun. I will not quit until I have it working.

I don't care if I have to wrap a coil around the chip and amplify the EMF to make sound, I WILL DO IT!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Wed. Dec 9, 2015 - 03:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so the HW are different from the link in #26 or ? because it had sound.

If there are room for two versions of that bird sprite, you should be able to get more colours if   it's made interlaced. (just move a pointer for odd and even pictures), or if you can make a 1/2 line delay you could get 480 lines with a "real" interlaced picture, as long it moves that fast no one will notice it.  

Pages