Main Menu

Vintage Computing

Started by kevin, September 28, 2011, 09:51:33 AM

Previous topic - Next topic

kevin


kevin

#16

Super Mario World Clone Released on the Atari 2600


http://www.dcemu.co.uk/vbulletin/threads/485420-Super-Mario-World-Clone-Released-on-the-Atari-2600



kevin

#17
Commodore 64: 8 Bit Legend



baggey

#18
Very interesting video.

I suppose the ZX Spectrum and the C64 are a bit like the XBOX 360 and the Sony playstation!?

It would be nice to see an emulator of the C64 or maybe a future project?

I Remember the C64 being very block like the ATARI. But i played uridum on the C64 in a computer shop and then bought it for the Spectrum 48k.

It was definitely better! However if the Spectrum had multi colour then well?

But hey! Hows about getting some info together for 6502 op codes, video RAM, Sid chip stuff etc. Enough to get some sort off emulation of the Ground?

Baggey
Jesus was only famous because of his dad

kevin

#19
QuoteEnough to get some sort off emulation of the Ground?

  Accurately emulating the C64 makes the spectrum look like a cake walk.  Most c64 effects are raster programmed, to the point where the emulator needs to be almost cycle accurate.

  Trying to emulate legacy programs (pre mid 80's) would be somewhat easier, as they tent not to be so raster based.  So you could get away with a refresh that's less accurate.  Newer stuff is almost exclusively dependent upon interrupts driving the many glitches in the video hardware.

  Something I had was thinking about a few years ago was knocking up a Vic20 emulator.  Very similar to the spectrum hardware without the timing issues of the c64/c128.


baggey

Here's where my nievity shows then. Ive heard of raster but dont know exactly what it is!?

I suppose this is why there arn't any C64 Emulators.

Baggey
Jesus was only famous because of his dad

kevin


  nah.. there's lots of C64/C128 emulators on pretty much every platform, most of the modern ones would be more than capable of running the vast majority of legacy games/programs, but when it comes to demo programming,  which routinely use exploits in the graphics hardware to create effects, then many soon turns into a few.


QuoteIve heard of raster but dont know exactly what it is!?

   C64 and raster interrupt programming go hand in hand.   Pretty much every game from the mid/early 80's uses some type of plexer effect.   The obvious ones are good old raster bars when the programmer alters the backdrop (or whatever colour you want) each scan line.   Games normally have multi plexed sprites. 

   The C64 only has 8 (true) hardware sprites for example , so to visualize more than 8 characters on screen as sprites at once,   sprite channels are plexed (reused) at intervals under raster interrupt at either fix or dynamic scanlines down the frame.  This allows the same sprite to appear on screen at multiple positions vertically.    It can't overlap (share the same slice) with itself though.   This works because the plexer is  running from the vertical beam position under interrupt, the viewer sees the plexed sprites as normal. 



baggey

Just been thinking about this raster effect  ::)

As i understand it?

The C64 has these 8 sprites sat in memory and at a particular interupt there thrown to the screen.

Depending on where the scanline is, and the point in time its pushed to screen. We could get an X,Y coordinate.

This is the bit that i presume is difficult?

So we must be able to create a dy/dx (dt) sort of look up table. So when we emulate the 8 sprites in video ram. They will be forced to the right position on screen!

Kind regards Baggey
Jesus was only famous because of his dad

baggey

Also,

Do you know what the video ram buffer etc starts and finishes in memory?

And

Do you know how the video buffer and colour buffer's are laid out?

If your interested?

Kind regards Baggey
Jesus was only famous because of his dad

kevin

#24
  Raster interrupts aren't needed to draw sprites.   They're needed to display more than 8 hardware sprites and the bulk of the classic effects.   To create the illusion of 16 hardware sprites say.   We set up an interrupt that positions/colours and sets up the hardware sprites prior to the first visible scanline that our sprites can appear on.    So either in the blanking gap before or after the previous frame.   Then when the beam reaches the half way point of the display, our next interrupt fires where we reposition our 8 sprite channels to 8 new positions.    Since the reposition is happening in sync with the beam position (as the graphics chip is spitting this all out to the TV) and prior to the sprites needing to be displayed again, the user sees 16 sprites..      You could do that without using raster interrupts, by just sitting and waiting for the beam position.  Which might be ok for a little demo, but largely impractical for a game.    

 The important thing from out tidbit, is that in order emulate it accurately, getting the timing right is critical.  Not for all programs as it could get away with the caching the 'state' video hardware many programs/games.   Where the emulator spits out an entire scanline on the current video registers.  But that doesn't work for code like this.  

 (pb styled pusedo code).

This infinite loop pokes and bumps the boarder colour constantly, creating an uncontrollable flashing effect in the boarders.    I dunno what the cycle count of such a loop  would be off the top of my head today, but lets say it's 16 clock cycles.   Moreover, we'll say the beam moves in 1 pixel increments each clock cycle.   So while the 6510 executes one loop of this  chunk of code, the beam position will have moved 16pixels (across and possible onto the next line down), these groups are drawn in the old state,  then when the poke drops the new value in the backdrop colour register,  the next fragment of 16 pixels are in the new colour.

PlayBASIC Code: [Select]
do

pokebyte 53280,X ; boarder colour register
X++
X=X and 15

loop




  really, the best way to learn stuff is download a cross assembler and actually do it.  


  Related Articles:

     * Palette Mapped / Raster Bar Examples in PlayBASIC



kevin


Commodore VIC-20 Documentary

Chapter 1


Chapter 2


Chapter 3




buggage

My best mate had a VIC 20 back in the day. I was so envious of him. But then he also had a Philips Video-Pac. There is such a thing as Karma! :P

kevin

 Another oldie but a goodie..

How to make an Apple II computer fit on your wrist.

kevin


monkeybot