Video chip Vicky capability question

Description of your first forum.
bzuidgeest
Posts: 41
Joined: Wed May 01, 2019 6:51 pm

Video chip Vicky capability question

Post by bzuidgeest » Tue May 07, 2019 12:13 pm

I looked over the specs of Vicky and the look quite impressive. Certainly in line with was available in the old consoles and home computers but better.

I was thinking that it might be possible to port over some dos era game code. But the CGA, EGA en VGA cards of the time did not have fancy sprite modes if I recall correctly. Some might use a double buffer, but many just did draw in vsync. This kind of code could off course be rewritten to use the capabilities of Vicky, but some dos code is quite integrated and that might not be easy to do.

So the question, Does Vicky provide the option to do ordinary double buffering or provide a signal to draw on vsync? In essence, is Vicky fast enough to emulate the crappiness of the earlier IBM pc grahics cards? :)

I have no clue as to how fast the CPU really is so maybe making use of vicky's strenghts is required to compensate for slow CPU speeds. Then again the early Intel CPU's are not exactly speed daemons either...
ZeroByte
Posts: 13
Joined: Thu Apr 25, 2019 5:13 pm

Re: Video chip Vicky capability question

Post by ZeroByte » Tue May 07, 2019 2:14 pm

To my understanding, VGA is nothing but a bunch of bytes to write pixels into. It has no HW sprites, no tiles, no hardware scrolling, etc. The one sprite-like function was HW mouse pointer.

On Vicky, it would be like using ONLY the bitmap layer. I can’t say how many CPU cycles it would take to write 640x480 bytes of memory but that’s essentially the task at hand w/o HW sprites, tiles, DMA blitters etc.

From experience on C64, with loop unrolling and watching out for page boundaries, you can move all 1000 screen characters in one refresh as a blit (I.e. not much room for logic in there). 640x480 at 8bpp is 307.2 times more data.

I don’t think C256F is THAT much faster than C64. But hey, it doesn’t NEED to be with tiles. That’s why tiles are a thing. Plus Vicky has a sliding scroll window where C64 has to do a trick called VSP.
bzuidgeest
Posts: 41
Joined: Wed May 01, 2019 6:51 pm

Re: Video chip Vicky capability question

Post by bzuidgeest » Tue May 07, 2019 2:59 pm

VGA is pretty simplistic indeed. But you would not necessarily have to update the entire screen on each draw. So you would not need to push all pixels every time. I doubt even old pc's were fast enough for that. Many programmers of the time had good tricks to know exactly which part of the screen they needed to update.

Vicky had a single bitmap layer, and quite a lot of memory. So I think double buffering the bitmap layer could be done if one did not use sprites. The question I had was if such a thing was implemented. Could be really simple just a pointer in a register to where the bitmap layer starts in memory and then switch it around during v sync.
ZeroByte
Posts: 13
Joined: Thu Apr 25, 2019 5:13 pm

Re: Video chip Vicky capability question

Post by ZeroByte » Tue May 07, 2019 4:20 pm

Reduced screen area can help, obviously. Anyway, the Wiki entry for Vicky says the bitmap is able to be located at an arbitrary memory location in bank $B0.

https://wiki.c256foenix.com/index.php?title=VICKY

The bitmap location is stored as 24 bits in 3 8-bit registers.
BM_START_ADDY_L = $AF0141
BM_START_ADDY_M = $AF0142
BM_START_ADDY_H = $AF0143

This does make me curious.
B0:0000 - B0:FFFF is only 64k and a 640x408 bitmap at 8bpp takes up 300k.
B0:0000 - BF:FFFF is 1023K (1 meg) and has room for 3 complete bitmaps.

So I'm assuming I must be misreading the Wiki a little and that the high byte for bitmap location can be B0-BF, and not just B0. Otherwise it wouldn't make sense to even have a high-byte register.
User avatar
stef
Posts: 64
Joined: Thu Jan 01, 1970 12:00 am
Location: Somewhere in the Universe
Contact:

Re: Video chip Vicky capability question

Post by stef » Tue May 07, 2019 5:55 pm

ZeroByte wrote:
Tue May 07, 2019 4:20 pm
Reduced screen area can help, obviously. Anyway, the Wiki entry for Vicky says the bitmap is able to be located at an arbitrary memory location in bank $B0.

https://wiki.c256foenix.com/index.php?title=VICKY

The bitmap location is stored as 24 bits in 3 8-bit registers.
BM_START_ADDY_L = $AF0141
BM_START_ADDY_M = $AF0142
BM_START_ADDY_H = $AF0143

This does make me curious.
B0:0000 - B0:FFFF is only 64k and a 640x408 bitmap at 8bpp takes up 300k.
B0:0000 - BF:FFFF is 1023K (1 meg) and has room for 3 complete bitmaps.

So I'm assuming I must be misreading the Wiki a little and that the high byte for bitmap location can be B0-BF, and not just B0. Otherwise it wouldn't make sense to even have a high-byte register.

@ZeroByte , bzuidgeest , before I go and answer your question.

Let me be a bit more philosophical about the whole "porting" thing and the then you can completely ignore me... One the reason I got into doing this project was on one hand the chance to offer something new to the retro community, a new machine... In a way, a shot at having those feelings we had when we start tinkering with our C64. And I think I have achieved that and soon you will experience it. The second part was about having a chance to create new things, to move on from what we have been given so far. I believe that we have been deeply indoctrinated in our ways to see the world and how it should be and we are deeply attached to a construct that was done and created before hence the reason we feel compelled to reproduced what was done before. I come from the vision, that we should let go of our shackles and create totally new things that could or not have a link to the past... I for one, I am looking to do a new "Jumpman" game. It borrows from the past, but it will be a 2019 thing with the capabilities that the machine offers and a complete clean room implementation. Does it have a link to the past... Yes, is it a complete port... Hell no.

Now, trying to do anything in Bitmap with the Foenix will be very challenging and if I were you I would try to stay away. The Power of the CPU and the size and the speed of the screen refresh is too disproportionate. You just don't have enough bandwidth to peek and poke in the video memory @ full frame rate. THis is not happening. THis is the reason, there is a gazillions amount of sprites and tiles, this is to give the developer the tools to avoid going and start moving shit around in the bitmap memory. If the Video Resolution would be 320 x 200 then it would be fine, but not @ 640 x 480 @ 60FPS. And yes, you can move the video memory pointer with the Video Memory ($B0:0000 - $EF:FFFF) since you have 4Megs of it and yes you can do double/triple buffering, but the way VICKY's core is implemented to support all these tiles and Sprites makes the access to the video memory during playback very limited.

Let's do the Math shall we:
the CPU is Running 14Mhz = circa 70ns per Fetch Cycle (not per instructions) 3 Clock cycle Avg per instruction.
The Video is Running @ 25.175Mhz = circa 39ns per Pixel

The total frame size is 800 x 525 = 420,000 Pixel Clock
The Active Area = 640 x 480 = 307,200 Pixel
So, you have 16ms of a frame time (this is not considering that time that needs to be removed when VICKY is accessing the memory) But for the sake of the argument:

So if you read and write memory it will be 2 instructions with an avg of 7 Clock cycle (I am being generous) = 7 Clock @ 70ns = 490ns (this is to go write a Pixel).

16ms / 490ns = ~32653 Pixels, this is the time you have to go write and erase pixels on the screen for 1 Frame time. That's it.

So, I rest my case.

Cheers!

Stefany ;)

PS: And what is it with you guys, where the first thing you want to do, is the thing that you should not be doing???? ;)
Mistress of All Villainy
ZeroByte
Posts: 13
Joined: Thu Apr 25, 2019 5:13 pm

Re: Video chip Vicky capability question

Post by ZeroByte » Wed May 08, 2019 3:19 am

I don’t want to do a bitmap screen. I’m a sprites and tiles guy all the way! I just wanted to point OP to the Wiki and then got curious about how I interpreted what it said.

Me, if I had an artist and a musician working with me, I’d make a side-scrolling shooter like Gradius/R-type but with a fresh mechanic (not sure what that might be).

Instead of just an ‘All your base are belong to us’ intro followed by waves of mindless blasting, I’d go for an experience more like Starfox with interesting pilots. I’m thinking a brother/sister twins duo where each ship has a distinct look and weapons style, with 2player simultaneous play and combo attacks. I’d have them doing radio chatter with a little picture-in-picture popping up with the face of whoever’s talking. Preferably it would be voice acting , not text.

There. That original enough? ;)
User avatar
stef
Posts: 64
Joined: Thu Jan 01, 1970 12:00 am
Location: Somewhere in the Universe
Contact:

Re: Video chip Vicky capability question

Post by stef » Wed May 08, 2019 3:46 am

ZeroByte wrote:
Wed May 08, 2019 3:19 am
I don’t want to do a bitmap screen. I’m a sprites and tiles guy all the way! I just wanted to point OP to the Wiki and then got curious about how I interpreted what it said.

Me, if I had an artist and a musician working with me, I’d make a side-scrolling shooter like Gradius/R-type but with a fresh mechanic (not sure what that might be).

Instead of just an ‘All your base are belong to us’ intro followed by waves of mindless blasting, I’d go for an experience more like Starfox with interesting pilots. I’m thinking a brother/sister twins duo where each ship has a distinct look and weapons style, with 2player simultaneous play and combo attacks. I’d have them doing radio chatter with a little picture-in-picture popping up with the face of whoever’s talking. Preferably it would be voice acting , not text.

There. That original enough? ;)
Hey ZeroByte , I am sorry,

Sometimes, I come across preachy and very opinionated, to say the least. What can I say, I am purist when it comes to those things... In the end, it is going to be your unit and you will be able to whatever you want! ;)

Now, take a look at the Kernel depot on github and take a look @ the _def.asm file you will find information about the diferent registers...

https://github.com/Trinity-11/Kernel

And maybe we ought to set you up with an early version of the Foenix IDE.

Sorry again, I really your enthusiams though!

Cheers

Stefany
Mistress of All Villainy
bzuidgeest
Posts: 41
Joined: Wed May 01, 2019 6:51 pm

Re: Video chip Vicky capability question

Post by bzuidgeest » Wed May 08, 2019 11:07 am

Sometimes, I come across preachy and very opinionated
As long as one is truthful and polite, expressing opinion is fine by me, even if it is a strong one :). I have strong opinions myself.

That said, the truth is that I'm not that creative when it comes to designing a game. I'm no musician or graphics designer and such so I am not going to design the next great game.

I like programming and I like some challenge with coding (compared to my programming skill). So the only effective way I'm going to contribute to the platform something a user would want to play is by porting things from other platforms. When doing that I can be creative in code though not in content and that is enough for me.
Also you must consider that porting things over is the easiest way to get a content base to attract users. Not only nostalgic hardware but also software.

Last, creating the platform is an great accomplishment in itself, expecting it to generate a new paradigm in gaming might be expecting a bit to much... But I understand you want the best for you brainchild :)
User avatar
stef
Posts: 64
Joined: Thu Jan 01, 1970 12:00 am
Location: Somewhere in the Universe
Contact:

Re: Video chip Vicky capability question

Post by stef » Wed May 08, 2019 2:34 pm

bzuidgeest wrote:
Wed May 08, 2019 11:07 am
Sometimes, I come across preachy and very opinionated
As long as one is truthful and polite, expressing opinion is fine by me, even if it is a strong one :). I have strong opinions myself.

That said, the truth is that I'm not that creative when it comes to designing a game. I'm no musician or graphics designer and such so I am not going to design the next great game.

I like programming and I like some challenge with coding (compared to my programming skill). So the only effective way I'm going to contribute to the platform something a user would want to play is by porting things from other platforms. When doing that I can be creative in code though not in content and that is enough for me.
Also you must consider that porting things over is the easiest way to get a content base to attract users. Not only nostalgic hardware but also software.

Last, creating the platform is an great accomplishment in itself, expecting it to generate a new paradigm in gaming might be expecting a bit to much... But I understand you want the best for you brainchild :)
I see where you are coming from and I understand. You know, early on, the C64 games were not that great either, the machine has its own "bell" curve of evolution. In the end, for me what is important, is for you and everybody who decides to get on board with this machine to have fun with.

In terms of a new paradigm, I think I already created one. The biggest issue is for people to embrace it and that will take time and persistence I guess and the monkey effect! ;o)

cheers
Stefany
Mistress of All Villainy
User avatar
tomxp411
Posts: 10
Joined: Thu May 09, 2019 11:19 pm
Location: California, USA

Re: Video chip Vicky capability question

Post by tomxp411 » Thu May 09, 2019 11:46 pm

stef wrote:
Tue May 07, 2019 5:55 pm
Now, trying to do anything in Bitmap with the Foenix will be very challenging and if I were you I would try to stay away. The Power of the CPU and the size and the speed of the screen refresh is too disproportionate. You just don't have enough bandwidth to peek and poke in the video memory @ full frame rate. THis is not happening. THis is the reason, there is a gazillions amount of sprites and tiles, this is to give the developer the tools to avoid going and start moving shit around in the bitmap memory. If the Video Resolution would be 320 x 200 then it would be fine, but not @ 640 x 480 @ 60FPS. And yes, you can move the video memory pointer with the Video Memory ($B0:0000 - $EF:FFFF) since you have 4Megs of it and yes you can do double/triple buffering, but the way VICKY's core is implemented to support all these tiles and Sprites makes the access to the video memory during playback very limited.

Stef, It's funny how the same problems keep cropping up on different machines. A few weeks ago, I read one of the updates on the Commander 16... and sure enough, David and Lorin are talking about memory bandwidth and GPU issues - the same kinds of discussions we were having last year.
Post Reply