2K expansion at $9800-$9fff

Modding and Technical Issues

Moderator: Moderators

Post Reply
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: 2K expansion at $9800-$9fff

Post by Mike »

Don't worry. You're definitely not the first one to fall into this trap.

One hint that it's really not that easy could have been the lengths tokra and I went through to expand the graphics capabilities beyond the 'standard' 160x192 pixels bitmap of MINIGRAFIK. As the VIC chip can only use $0000 .. $03FF and $1000 .. $1FFF (5K in total) of an unmodded VIC-20, all graphics data need be sent through this needle eye. That's why the 6502 has to shuffle the graphics data from expansion memory into the internal RAM, so VIC can display it - synchronous to the raster beam. This emulated DMA uses up nearly 100% of the CPU time.

Contrary to this, the VFLI mod provides the 208x256 bitmap mode (PAL) essentially for free - the MAXIGRAFIK equivalent is done with just 2 NMIs per frame. To switch the three global colour registers and the colour RAM bank on each displayed raster then again eats up 256 of the 312 rasters, but that means there's still 20% of CPU available to the main program.

BTT: a monitor with a direct assembler would also be a nice tool in the $9800 to $9FFF range. (Edit: see here :mrgreen:)
tokra wrote:But are the full 2K theoretically available to use fully with the MegaCart as "pseudo-ROM" using tlr's injection tool?
The whole range can be written to (in some parts writes are very slow though), however the registers are strewn across all I/O 3 at $9x00 and $9x80 - one of them triggers a reset, the others change BLK5 between RAM and two different ROM chips - so surprises are guaranteed.
Possibly the MegaCart would need to be restored through the Service Menu to its factory settings or stored preferences afterwards.
Any program or game which requires me to do this, because it wrote all over the Mega-Cart NVRAM won't get a second chance to run on my VIC-20.
Last edited by Mike on Wed May 28, 2014 1:16 pm, edited 1 time in total.
User avatar
pixel
Vic 20 Scientist
Posts: 1357
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: 2K expansion at $9800-$9fff

Post by pixel »

Mike wrote:Don't worry. You're definitely not the first one to fall into this trap.

One hint that it's really not that easy could have been the lengths tokra and I went through to expand the graphics capabilities beyond the 'standard' 160x192 pixels bitmap of MINIGRAFIK. As the VIC chip can only use $0000 .. $03FF and $1000 .. $1FFF (5K in total) of an unmodded VIC-20, all graphics data need be sent through this needle eye. That's why the 6502 has to shuffle the graphics data from expansion memory into the internal RAM, so VIC can display it - synchronous to the raster beam. This emulated DMA uses up nearly 100% of the CPU time.

Contrary to this, the VFLI mod provides the 208x256 bitmap mode (PAL) essentially for free - the MAXIGRAFIK equivalent is done with just 2 NMIs per frame. To switch the three global colour registers and the colour RAM bank on each displayed raster then again eats up 256 of the 312 rasters, but that means there's still 20% of CPU available to the main program.
Yeah, I kinda figured there'd be a couple of traps, which is why I spent a couple of hours on the chip's wiki page. Thanks a lot, though. I hate idea of having to copy whole screens. Am banging my head on scrolling in all directions...

Maybe the VFLI mode would be nice for something like the game "2048" or something similar. I wonder why it didn't happen already.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: 2K expansion at $9800-$9fff

Post by Mike »

pixel wrote:I wonder why it didn't happen already.
Supposedly because soldering around on the mainboard isn't exactly everyone's cup of tea. Even given the possible enhancements. :(

It doesn't help either that people mistake the permanent nature of the expansion for increased incompatibility. I went all-length to explain what exactly matters in that case, that it is possible to soft-limit the RAM, that I run my VIC-20 for over 3 years now with no found instance of a program which would trip over the extra RAM, etc. ... but no avail.

Judging from the knowledgable fellows here in the forum, I thought there would be at least one other modded VIC-20 after 1 or 2 months, and then maybe 5 or 6 over the following year. Nothing like that happened. Rest of the story is told here.
User avatar
pixel
Vic 20 Scientist
Posts: 1357
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: 2K expansion at $9800-$9fff

Post by pixel »

Mike wrote:
pixel wrote:I wonder why it didn't happen already.
Supposedly because soldering around on the mainboard isn't exactly everyone's cup of tea. Even given the possible enhancements. :(
Ah! THAT thing. Sorry, I didn't suck up all those articles in their entirety, yet. But it's on my TODO list. :oops:
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: 2K expansion at $9800-$9fff

Post by Mike »

pixel wrote:I hate idea of having to copy whole screens. Am banging my head on scrolling in all directions...
In any case Leveledit might be worth a look. Here, of the 8-way scrolling the horizontal part is also done with selected character pairs, and the vertical part with the hardware scroll register. :)
User avatar
pixel
Vic 20 Scientist
Posts: 1357
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: 2K expansion at $9800-$9fff

Post by pixel »

Mike wrote:
pixel wrote:I hate idea of having to copy whole screens. Am banging my head on scrolling in all directions...
In any case Leveledit might be worth a look. Here, of the 8-way scrolling the horizontal part is also done with selected character pairs, and the vertical part with the hardware scroll register. :)
Holy Moly! Now THAT's smooth. Well, I just arrived at the necessity to mix chars and screen... but I can't use the hardware scrolling. Otherwise the sprites eat up too much of everything.

I'd love to discuss this more, but aren't we going too off-topic here and risking tokra to hate us? ;)
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
Post Reply