GeoRAM on the Vic20

Discuss anything related to the VIC
CurtisP
Vic 20 Dabbler
Posts: 99
Joined: Tue Mar 08, 2005 8:24 pm

GeoRAM on the Vic20

Post by CurtisP »

Hey guys, I'm back.

Anyway, I somehow got obsessed with the idea of using GeoRAM on the Vic20 using the Masc=uerade adapter, since this configuration is supported by VICE.

Anyway, here are the relevant memory locations:

40959 - $9fff - block selection, each block is 16KB
40958 - $9ffe - select a 256-byte page within the block (0-63)

38912 - $9800 - GeoRAM page access
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: GeoRAM on the Vic20

Post by eslapion »

GeoRAM is a large bunch of 256 bytes pages. On the VIC-20, the IO areas are 1024 bytes which can reduce swapping.

Plugging a GeoRAM on a VIC-20 is really trivial but it's not obvious to me that's it is really useful.

On the C64, reserving a 8k area either reduces the amount of RAM available to basic or requires disabling some of the firmware ROMs. On the VIC-20, you can use BLK5 and use a very large RAM expansion based on 8k blocks instead of small 256 bytes pages.

It's easy to convert a Behr-Bonz board into a 128x8k (1024k) RAM expansion. Perhaps even a 128x32k (4MBytes) expansion if you're willing to 'window' BLK 1, 2, 3 and 5.
Be normal.
CurtisP
Vic 20 Dabbler
Posts: 99
Joined: Tue Mar 08, 2005 8:24 pm

Re: GeoRAM on the Vic20

Post by CurtisP »

The I/O areas on the C64 are also 1KB. The GeoRAM design put the 256 byte page at the bottom of the 1k and the two control registers at the top, wasting a lot of space.

Of course it was not really meant for direct memory access, but for memory swapping.

I'm a bit dubious about the VICE implementation, since seems to be mapping three GeoRAM across both I/O slots.
User avatar
MCes
Vic 20 Afficionado
Posts: 457
Joined: Fri Jul 24, 2015 1:19 am
Location: Italy

Re: GeoRAM on the Vic20

Post by MCes »

"Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe." (Albert Einstein)
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: GeoRAM on the Vic20

Post by Mike »

CurtisP wrote:The I/O areas on the C64 are also 1KB.
Erm, no. The I/O address range on the C64 is partitioned as follows:

Code: Select all

$D000..$D3FF: VIC
$D400..$D7FF: SID
$D800..$DBFF: colour RAM
$DC00..$DCFF: CIA #1
$DD00..$DDFF: CIA #2
$DE00..$DEFF: I/O 1 for cartridge port, 256 bytes
$DF00..$DFFF: I/O 2 for cartridge port, 256 bytes
The address ranges for VIC, SID, CIA #1 and CIA #2 contain a lot of mirrors due to incomplete address decoding.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: GeoRAM on the Vic20

Post by groepaz »

I'm a bit dubious about the VICE implementation, since seems to be mapping three GeoRAM across both I/O slots.
three? how three? *shrug*

it maps the registers into the IO2 area (dffe/ff - with mirrors across the whole page due to incomplete decoding) and the actual RAM page into IO1 (dexx). nothing dubious about it really :)

and no, the big advantage of georam over REU is that you can do direct memory access (and even run code in the mapped RAM). and most programs use it that way, just copying stuff in and out would be a waste of time.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
CurtisP
Vic 20 Dabbler
Posts: 99
Joined: Tue Mar 08, 2005 8:24 pm

Re: GeoRAM on the Vic20

Post by CurtisP »

So the GeoRAM basically took up both I/O blocks on the C64, then. I need to look at three memory maps again. It seems I'm not as good at mental hexadecimal as I used to be.

Also, I was fairly certain that Geos used the GeoRAM for swapping. I don't know how many other programs supported it.
brain
Vic 20 Nerd
Posts: 531
Joined: Sun Jul 04, 2004 10:12 pm

Re: GeoRAM on the Vic20

Post by brain »

I'd be interested if you get it working. The GeoRAM was pretty simplistic.
merman
Vic 20 Enthusiast
Posts: 152
Joined: Thu Feb 25, 2016 9:46 am
Location: Skegness UK
Occupation: Writer

Re: GeoRAM on the Vic20

Post by merman »

brain wrote:I'd be interested if you get it working. The GeoRAM was pretty simplistic.
Yeah, it lacked the DMA chip that was in official Commodore REUs so transfer speeds were slower.
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: GeoRAM on the Vic20

Post by Mike »

To say GeoRAM "lacked" the DMA chip is possibly a bit of mis-nomer. It used another concept than the REUs.

With GeoRAM, contrary to the CBM REU, you can execute code in the (allegedly very small) 256 byte window banked into $DE00..$DEFF. As with all banking solutions, the contents of $DE00..$DEFF are changed by a single write to the control register. The REU would need 256 cycles to transfer that data.

Of course, if you then needed to copy the data in $DE00..$DEFF to another place, that'd require a copy loop on the CPU. Slower, but no showstopper. Both solutions provide extra memory, that is usable in one way or another.
User avatar
Gyro Gearloose
Vic 20 Enthusiast
Posts: 174
Joined: Wed Sep 28, 2016 8:26 pm
Location: Montreal
Occupation: Drunk

Re: GeoRAM on the Vic20

Post by Gyro Gearloose »

Mike wrote:To say GeoRAM "lacked" the DMA chip is possibly a bit of mis-nomer. It used another concept than the REUs.

With GeoRAM, contrary to the CBM REU, you can execute code in the (allegedly very small) 256 byte window banked into $DE00..$DEFF. As with all banking solutions, the contents of $DE00..$DEFF are changed by a single write to the control register. The REU would need 256 cycles to transfer that data.

Of course, if you then needed to copy the data in $DE00..$DEFF to another place, that'd require a copy loop on the CPU. Slower, but no showstopper. Both solutions provide extra memory, that is usable in one way or another.
:?:
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: GeoRAM on the Vic20

Post by Mike »

Gyro Gearloose wrote: :?:
Thanks. It took me some time though to spot the emphasis you added within the full quote.

Take that word, replace it with "admittedly" and you're there.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: GeoRAM on the Vic20

Post by groepaz »

btw, if you are curious to see software that runs entirely in such 256byte window - check the ISEPIC software. the cartridge works pretty similar regarding RAM mapping - only the bank switching is a lot more weird =)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
brain
Vic 20 Nerd
Posts: 531
Joined: Sun Jul 04, 2004 10:12 pm

Re: GeoRAM on the Vic20

Post by brain »

At the risk of shamelessly plugging my stuff, Ultimem has 1MB of SRAM, and it pages it in at 8kB chunks, so it may be much more usable than GeoRAM, and the device is supported in VICE as well.

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

Re: GeoRAM on the Vic20

Post by Mike »

groepaz wrote:btw, if you are curious to see software that runs entirely in such 256byte window [...]
They surely have to map in a new 256-byte window whenever there is another sub-routine call. Including a small call stub that's present in all of these pages. I can vividly imagine that.

The address range of $9200..$93FF internal to VIC-20 could be used to pull off a similar stunt. ;)
Post Reply