Software sprites?

Basic and Machine Language

Moderator: Moderators

Post Reply
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

OK, I've checked it on a real (PAL) machine and it works perfectly: it's as smooth as an hardware sprite and with no IRQ timing problems at all. Amazingly fluid.

On the emulation side, I still get problems--I've tested several VICE versions ranging from 1.18 to 2.1 and all behave differently from a real machine. Mess emulator behaves even worse than VICE because it displays strange dots artifacts on the demo program I've compiled.

If you want to check yourself, here is the binary .prg:

http://xoomer.virgilio.it/aporcino/Vic20/primer.prg

it's nothing else than your "sample.s" with a custom IRQ that flips screen color on each IRQ call. My idea is that, if everything is OK, the colour change should be perceived as a plain color flicker. If timing is wrong, the flickering should be fuzzy and blocky.

If you check it, do that in PAL and NTSC and tell me if in your emulator it runs as expected.

@nbla000: this SSS thing is so intriguing that I've come out of my lurk mode :) are you interested in it too?
rhurst
Omega Star Commander
Posts: 1369
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

I ran your modified primer.prg on VICE 2.1 in both NTSC and PAL modes -- perfect.

I transferred the same binary over to my real NTSC VIC -- perfect.

I also ran it using MESS 0.131 in NTSC mode -- runs, but there is a noticeable dot artifact creeping up the display on every redraw. Other than that, it ran closely like the real thing.

I haven't the foggiest as to the source of the issue you are seeing.
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
User avatar
nbla000
Salmon Run
Posts: 2582
Joined: Thu Oct 13, 2005 8:58 am
Location: Italy

Post by nbla000 »

nippur72 wrote:@nbla000: this SSS thing is so intriguing that I've come out of my lurk mode :) are you interested in it too?
Why not ? contact me in PM or via Email.
Mega-Cart: the cartridge you plug in once and for all.
AmiDog
Vic 20 Newbie
Posts: 18
Joined: Mon Oct 15, 2007 4:22 am

Post by AmiDog »

nippur72 wrote:On the emulation side, I still get problems--I've tested several VICE versions ranging from 1.18 to 2.1 and all behave differently from a real machine.
Maybe it's the emulator that's skipping frames? What computer are you using?
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

AmiDog wrote:Maybe it's the emulator that's skipping frames? What computer are you using?
I suspect the emulator isn't able to correctly refresh the video page when SSSFLIP is called. Don't know why. I use an AMD dual core @1.6Ghz and a 3d video card, so I suppose it should be fast enough.
Gary_Leeds
Vic 20 Amateur
Posts: 54
Joined: Wed Feb 18, 2009 5:21 am

Post by Gary_Leeds »

Just reading back over this thread and coupling it with a post on one of the plus 4 forums. You say 256 "simple" sprites could be handled. If someone had the skills and time would Lemmings be at all possible on the Vic? An open source project for the DS already exists with the source here http://www.mrdictionary.net/lemmings/le ... downloads/

Could be a very interesting project, just wish I had the skills to do it :(
rhurst
Omega Star Commander
Posts: 1369
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

... would Lemmings be at all possible on the Vic?
Sure, but given the VIC real estate and speed, I would not attempt to save more than 10 Lemmings on any given level. Lemmings don't move that fast to begin with, so all "active" Lemmings do not have to be redrawn every frame.

I believe the key would be its UI ... since Lemmings worked with a mouse / trackball, using FKEYs to switch the action button and programming a smooth target pointer for the joystick is essential.

I just wonder how acceptable a translated game like that on VIC could turn out, because my attraction to playing Lemmings was its scenery (rolling grass hills, caves, etc.) with a groovy upbeat tune that was easy to march to.
... the skills to do it
Given those parameters with VIC as the target, it would be very challenging. At the very least, you'd need Carlsson to do the music work! :P
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
English Invader
Vic 20 Scientist
Posts: 1193
Joined: Tue Apr 28, 2009 3:51 pm

Post by English Invader »

I have a slightly less challenging proposition. Ghostbusters.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Some day I'll find time to have a look at this sprite library too. Since I generally don't have the patience to make perfect ports of existing games, I would probably rather try to make a loose cover or variant.

Besides the more unique titles, the more people will feel an urge to get a VIC-20. People already have played Lemmings, Ghostbusters, Sim City and all the others for decades. ;-)
Anders Carlsson

Image Image Image Image Image
rhurst
Omega Star Commander
Posts: 1369
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

FYI, I merged (using the nifty pygtk-based utility: meld) the latest updated source to Quikman 8k with the included demo in this package using the newer sprite routines.
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
rhurst
Omega Star Commander
Posts: 1369
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

Using the M.E.S.S. debugger, I discovered that SSSPOKE, SSSREAD, and SSSCOMMIT were burning up extra CPU cycles, thus reducing precious framerates. Optimizations were put in, and tested with the new Quikman+8k and Omega Fury. I think both games play much faster more evenly than before -- and perhaps more enjoyable.

The primer sources, fixed binaries, and demos all have been updated and re-compiled in this archive. Enjoy!
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
rhurst
Omega Star Commander
Posts: 1369
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

Posted an update to this archive which includes fixes to the documentation and minor patches to the primer sources.
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
rhurst
Omega Star Commander
Posts: 1369
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

FYI, I am enhancing this software more for the following:

- flag for collision-detection (using it now for WIP: Berzerk MMX)
- primer for CC65
- primer for BASIC and other assemblers
- other optimizations

More to follow as Berzerk matures. For those interested in previews, download it here.

Just press FIRE or any key after it RUNs, to properly seed the random number generator. If you have quick reflexes, you might still be able to shoot yourself in the foot! :P
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
User avatar
Pedro Lambrini
Vic 20 Scientist
Posts: 1132
Joined: Mon Dec 01, 2008 11:36 am

Post by Pedro Lambrini »

Looking good! You,sir, are awesome! :)
"...That of the Eastern tribe being like a multitude of colours as if a rainbow had settled upon its brow..." Daniels 1:3
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Post by nippur72 »

rhurst wrote:flag for collision-detection (using it now for WIP: Berzerk MMX)
two great news! Berzerk working in progress and collision detection!!! :D :D
Post Reply