Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > CSDb Discussions > PETSCII demos and BASIC kit
2023-02-07 16:57
Mr SQL

Registered: Feb 2023
Posts: 114
PETSCII demos and BASIC kit

Hello Everyone! :)


Try these new PETSCII demo's and download the BASIC for creating them here:
http://relationalframework.com/GameLoader_C64_Atari_emulator_wi..
This kit allows the C64 to run Advanced Atari 2600 demo programs using a soft ANTIC blitter, soft TIA and soft RIOT chip inside the prg. The code for the soft TIA and soft RIOT chips could be removed from the demo binaries and the programs would still run on a real Atari 2600 using just soft ANTIC.

The demos can be (re)compiled cross platform for the C64 and Atari 2600, and on the C64 the demos have texture mapped PETSCII and dynamic PETSCII.

Here is a fun dynamic petscii example of a Super Arkanoid demo in user mode (as a playabe game):
http://relationalframework.com/c64.html?file=arkanoidairheadb.p..
Download prg for the C64 and VICE:
http://relationalframework.com/arkanoidairheadb.prg


The kit is also great for creating Cracks of demos to change text and music like with fluid city and fluid city b side:
http://relationalframework.com/c64.html?file=fluidcitybside.prg
http://relationalframework.com/c64.html?file=fluidcity.prg
Download prgs for the C64 and VICE:
http://relationalframework.com/fluidcitybside.prg
http://relationalframework.com/fluidcity.prg


Fluid City took first place at Silly Venture on the Atari 2600 but I have not entered it in a Commodore contest yet, the prg is a C64 demo and also a demo of cycle precise pixel perfect emulation of an advanced Atari 2600 demo.

Coding demos and games with this kit will be easy and fascinating for C64 programmers using new hardware features like 4 levels of sprite scaling and hardware reversible sprites, and a large tile mapped virtual world and playfield cam.

Advanced programmers can explore the soft ANTIC, TIA and RIOT chip implementations.

Please share your thoughts!
2023-02-07 18:55
chatGPZ

Registered: Dec 2001
Posts: 11100
cycle precise pixel perfect emulation of an advanced Atari 2600 demo

please elaborate. (Can you point to a video of the program running on VCS?)
2023-02-07 20:17
Mr SQL

Registered: Feb 2023
Posts: 114
Quote:
cycle precise pixel perfect emulation of an advanced Atari 2600 demo

please elaborate. (Can you point to a video of the program running on VCS?)


Here are links for both of those two demos running in Javatari the online Atari 2600 emulator:

https://javatari.org/?ROM=http://relationalframework.com/ARKANO..

https://javatari.org/?ROM=http://relationalframework.com/SillyV..

Atari 2600 ROM's:
http://relationalframework.com/ARKANOID_AIRHEAD_FINDS_AIRHEAD.b..
http://relationalframework.com/SillyVenture2019_Fluid_City_B_Si..

The tiny8bit emu for the C64 is not cycle precise so to compare them precisely side by side you will need to download the prg's for VICE or the real C64 hardware to match against the Javatari emulator which is cycle precise, or a real Atari 2600.

If you play Fluid City on an NTSC C64 you will see 60 FPS of full screen animation when you hit the throttle matching the Atari 2600 cycle timing precisely.

It is cycle perfect because the same program code is running on the 6502 with the C64 as on the Atari 2600, but on the 64 it is interacting with a shadow register bus on the zero page to talk to the soft TIA and RIOT chips.

If you play them on a PAL C64 the demos will run slower at 50 FPS.
2023-02-07 20:49
chatGPZ

Registered: Dec 2001
Posts: 11100
Mmmh we may have different definitions of "cycle exact emulation"... Is it supposed to show what looks like mostly random petscii garbage instead of the colored blocks, like on VCS? *shrug*
2023-02-07 21:12
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: Mmmh we may have different definitions of "cycle exact emulation"... Is it supposed to show what looks like mostly random petscii garbage instead of the colored blocks, like on VCS? *shrug*

You can select four PETSCII characters for the foreground tiles and four PETSCII characters for the background tiles.

PETSCII textures can also be changed programmatically.

Multicolor playfields haven't been implemented yet but you can color in the color RAM to simulate them.
2023-02-07 21:27
chatGPZ

Registered: Dec 2001
Posts: 11100
*shrug* But how is that "cycle precise pixel perfect emulation" then? I don't get it. The VCS doesn't even have a framebuffer iirc?
2023-02-08 00:13
Oswald

Registered: Apr 2002
Posts: 5017
*shrug*

"the tiny8bit emu for the C64 is not cycle precise"
2023-02-08 00:15
chatGPZ

Registered: Dec 2001
Posts: 11100
i think he refers to https://github.com/floooh/tiny8bit - not that anyone would use that :)
2023-02-08 04:04
Mr SQL

Registered: Feb 2023
Posts: 114
Quoting Groepaz
*shrug* But how is that "cycle precise pixel perfect emulation" then? I don't get it. The VCS doesn't even have a framebuffer iirc?

Yes the VCS has no framebuffer, but these advanced Atari demos have a soft ANTIC blitter with multiple frame buffers.

Here is a display list demo showing three separate frame buffers running on the Atari 2600 and the C64.
http://relationalframework.com/c64.html?file=displaylistdemo.prg
https://javatari.org/?ROM=http://relationalframework.com/Flashb..

You can see the three differently timed display zones render cycle precise and pixel perfect, with PETSCII textures added.
2023-02-08 04:11
Mr SQL

Registered: Feb 2023
Posts: 114
Quoting Oswald
*shrug*

"the tiny8bit emu for the C64 is not cycle precise"

Yes tiny8bit is the emu I am using in the links, is there a better online C64 emulator?

VICE is cycle precise by comparison and matches the real hardware. A good example of not being cycle precise is where you can see the screen start to tear in Fluid City using tiny8bit, particularly when using the throttle.
2023-02-08 13:14
chatGPZ

Registered: Dec 2001
Posts: 11100
"cycle precise and pixel perfect" vs "with PETSCII textures added"? I don't get it. Is this even emulating anything? Let alone "cycle precise and pixel perfect"?
2023-02-08 20:00
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: "cycle precise and pixel perfect" vs "with PETSCII textures added"? I don't get it. Is this even emulating anything? Let alone "cycle precise and pixel perfect"?

Yes the PETSCII is an extra feature, I think it looks really cool. You can select solid blocks to get rid of the textures with this kit if you don't like PETSCII.

Yes the Atari 2600 TIA and RIOT chips are really emulated using a shadow register bus in the zero page so the program code could run on a real Atari 2600.

Other than the difference in colors/lack of colors there are also different sounds and sound Fx, TIA to SID audio translation sounds very different on the C64.

Try this example with the Arkanoid and Fluid City demos above:

Play a few rounds on the Atari and the C64 and you will see that while the visuals match fluidly beyond the PETSCII the soundscapes are very different.

You'll need to use the real Commodore hardware or VICE set to 6581 (resid) to hear the analog filter effects.

I'm not sure I should try to correct this feature to match the TIA audio more precisely for being so intriguing.
2023-02-08 20:50
chatGPZ

Registered: Dec 2001
Posts: 11100
Quote:
Yes the Atari 2600 TIA and RIOT chips are really emulated using a shadow register bus in the zero page so the program code could run on a real Atari 2600.

But "cycle precise and pixel perfect"? I have my doubts, sorry.
2023-02-08 21:18
TheRyk

Registered: Mar 2009
Posts: 2053
Quoting Mr SQL
...
cycle precise ...



Really, I don't get what this is all about. As a proof-of-concept porting Atari->C64 it might be fun but the outcome is far from stunning or revolutionary.
2023-02-08 21:51
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: Quote:
Yes the Atari 2600 TIA and RIOT chips are really emulated using a shadow register bus in the zero page so the program code could run on a real Atari 2600.

But "cycle precise and pixel perfect"? I have my doubts, sorry.


Can you elaborate?

I gave a timing example with screen tearing and explained the same code was being run / same cycles.

You cited an example of the color not matching, could you share a similar example of the timing not matching or the pixels on the sprites and playfield not matching in the demos?
2023-02-08 22:04
tlr

Registered: Sep 2003
Posts: 1703
Quote: Can you elaborate?

I gave a timing example with screen tearing and explained the same code was being run / same cycles.

You cited an example of the color not matching, could you share a similar example of the timing not matching or the pixels on the sprites and playfield not matching in the demos?


I think this just a confusion of terms. Cycle exactness is a term commonly used to describe an emulators ability to emulate events cycle for cycle, matching what would happen in those cycles on the hardware.
2023-02-08 22:08
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: Quoting Mr SQL
...
cycle precise ...



Really, I don't get what this is all about. As a proof-of-concept porting Atari->C64 it might be fun but the outcome is far from stunning or revolutionary.


The New Space Invaders is a lot of fun see if you like it :)
http://relationalframework.com/c64.html?file=newspaceinvaders.p..

prg:
http://relationalframework.com/newspaceinvaders.prg
2023-02-08 22:15
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: I think this just a confusion of terms. Cycle exactness is a term commonly used to describe an emulators ability to emulate events cycle for cycle, matching what would happen in those cycles on the hardware.

Yes I agree. Fluid City is a good example of cycle exactness for being able to update the whole screen every frame 60x per second when the throttle is on.
That is where we see more tearing in Tiny8Bit emulation not being cycle exact.
2023-02-08 22:24
tlr

Registered: Sep 2003
Posts: 1703
Quote: Yes I agree. Fluid City is a good example of cycle exactness for being able to update the whole screen every frame 60x per second when the throttle is on.
That is where we see more tearing in Tiny8Bit emulation not being cycle exact.


That's not what I ment. Reproducing the code execution cycle for cycle would require running the exact same binary. Is this what is happening here?

I'm not trying to value the work done here, just trying to understand what it does.
2023-02-08 22:24
chatGPZ

Registered: Dec 2001
Posts: 11100
Quote:
being able to update the whole screen every frame 60x per second when the throttle is on

I don't think that is what tlr was trying to explain.
2023-02-09 01:24
Mr SQL

Registered: Feb 2023
Posts: 114
Quoting tlr
That's not what I ment. Reproducing the code execution cycle for cycle would require running the exact same binary. Is this what is happening here?

I'm not trying to value the work done here, just trying to understand what it does.

Great question! Yes it is running the exact same Atari 2600 binary.

The binaries are only 6K, the rest of the 30K prg executable contains the soft TIA and RIOT chip implementations [the emu] which the 6K binary interacts with using shadow registers on the zero page, right where the real TIA and RIOT chips registers and RAM are located on an Atari.
2023-02-09 02:08
chatGPZ

Registered: Dec 2001
Posts: 11100
So this can run... say Pacman? Joust? Why those rather trivial (and lets be honest: quite ugly) example programs?
2023-02-09 14:10
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: So this can run... say Pacman? Joust? Why those rather trivial (and lets be honest: quite ugly) example programs?

Pacman and Joust could be made to run with customization to the kernel, but they do not scroll.

This scrolling Pacman prod runs but has some bugs so I am not ready to release it yet:
https://www.pouet.net/prod.php?which=64999

This scrolling Breakout 2000 prod runs perfectly though and has lots of demo scrolling within scrolling going on:
https://demozoo.org/productions/271790/

Try it online here for the C64:
http://relationalframework.com/c64.html?file=brkoutlaserbeams.p..

Download the prg for VICE and the C64:
http://relationalframework.com/brkoutlaserbeams.prg

Check out how pretty this demo looks on a real CRT with custom PETSCII graphics and coloring in the color RAM:
http://relationalframework.com/Player_Designed_Graphics.JPG
2023-02-09 14:39
chatGPZ

Registered: Dec 2001
Posts: 11100
Quote:
Pacman and Joust could be made to run with customization to the kernel, but they do not scroll.

??? What does scrolling have to do with it?

Somehow i am getting the impression that calling this "emulation", let alone "cycle exact" or "pixel exact", is quite a bit of a misnomer. *shrug*
2023-02-09 16:28
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: Quote:
Pacman and Joust could be made to run with customization to the kernel, but they do not scroll.

??? What does scrolling have to do with it?

Somehow i am getting the impression that calling this "emulation", let alone "cycle exact" or "pixel exact", is quite a bit of a misnomer. *shrug*


The kit is designed for writing demos and games that scroll in BASIC using Display Lists like on the Atari 400/800.

Consider that since the same code is running it must be emulation.

The emulation appears cycle precise and pixel perfect unless you have an example besides PETSCII and lack of colors.

The emu is not designed to be compatible with every Atari 2600 ROM, it was designed to run ROM's that use the Display List technology in the soft ANTIC chip. It is now being expanded so it can accommodate more ROM's.
2023-02-09 17:10
chatGPZ

Registered: Dec 2001
Posts: 11100
Sounds to me like "emulation" is indeed the wrong term - and it is a wrapper library that happens to work with some things specifically built for it. Is that what it is?
2023-02-10 14:56
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: Sounds to me like "emulation" is indeed the wrong term - and it is a wrapper library that happens to work with some things specifically built for it. Is that what it is?

No it's the other way around. The Emulator was built specifically to run Advanced Atari games and demos that use the soft ANTIC blitter.

Activision released an emulator that only ran their games, there are no requirements for an emulator to run every ROM and chip configuration and there are many for the Atari 2600.

The TIA and RIOT chips and Atari 2600 system bus architecture are emulated closely enough for these programs to run.
2023-02-10 15:49
chatGPZ

Registered: Dec 2001
Posts: 11100
Now i wonder what "Advanced Atari games" means in this context. The examples seem to be anything but "advanced" to me :)
2023-02-10 16:33
Mr SQL

Registered: Feb 2023
Posts: 114
Quote: Now i wonder what "Advanced Atari games" means in this context. The examples seem to be anything but "advanced" to me :)

One of these prods won first place at Silly Venture the scene for advanced Atari demos using only classic hardware and expansion schemes.

There are also advanced Atari games that use the ARM chip, but they are not allowed in demo scene competition only classic hardware with completely software solutions like the comparative soft ANTIC chip powering these demos.
2023-02-10 16:48
chatGPZ

Registered: Dec 2001
Posts: 11100
wat
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mason/Unicess
Guests online: 57
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.099 sec.