Login
Back to forumReply to this topicGo to last reply

Posted By

MCes
on 2022-12-28
07:54:27
 "c264 jolly cart" system: a new RAM/ROM external expansion cart.

For a new project I'm thinking about a new cart that can be used also as basement for realize the cartridge version of a new owner game/sw...

"another RAM/ROM cart system? another one?" Yes, another RAM/ROM cart but with a new way to write on RAM....

To bank pages of ROM is not a problem because ROM has to be only read, the problem are on RAM writing activity:
Commodore made the 264 system as a very "locked" system:
no external DMA is possible (TED always drive the bus...)
no external way for expanding the C16 RAM for making it similar to a PLUS4,
also simply putting RAM on external ROM space is not possible:
the WRITE cycles on it will be performed on internal RAM anyway, and is not useful read RAM if you can't write on it....
Imagine that you will able to write ALSO on external RAM: the covered internal RAM will be corrupted and it's not a good idea for a PLUS4 memory map,but it's completely destructive for a C16 where the internal RAM is mirrored 4 times covering the 64k whole: corrupting the first 2 external pages result in corruption of page zero and processor STACK page1.....

The cart that I'm thinking use a little CPLD and 3 logic chips (and the RAM and ROM chips) and it can performing two different way for write on RAM (maybe also the EEPROM can be write by your 264).
The first is equivalent to the classic:
you write directly to the address and the data will be written to external RAM but also to internal RAM,
the second way is a little bit more complex (it need a little start procedure) but it is optimized for moving data blocks without corruption of any RAM location inside the 264 machine.

The cart can be support to a (16)32pages of 16k RAM (on "H" space) and to a (16)32pages of 16k EEPROM (on "L"space), a 8bit register select wich ram page and wich eeprom page is enabled to be read/write

Is this type of cart interesting?

Posted By

Majikeyric
on 2022-12-29
07:46:08
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

As a developer I would be interested in such a cart, YES ! happy

Posted By

Litwr
on 2022-12-29
08:07:32
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

> no external way for expanding the C16 RAM for making it similar to a PLUS4
There are several cards that expanded the C16 RAM to 64 KB

Posted By

MCes
on 2022-12-30
07:09:22
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

@Litwr
"There are several cards that expanded the C16 RAM to 64 KB"
Yes, but they don't work (as we intend)....

264 machines are based on TED chip that generate the /CAS signal for enabling the RAM chips,
the TED /CAS pin is connected to the internal RAM chips directly with a copper track on board,
this imply that independently by the current address the internal RAM is enabled and drive the data bus:
inside PLUS4 it's a normal 64k addressing,
into a C16 the A15 and A14 lines are not connected to the RAM chip (and the lines are also not decoded...) so inside a C16 the 64k ram space is fulfilled 4 time by the same 16k RAM (mirrored).
For example try on C16 to POKE (or PEEK) a specific data into a free byte,
this action result is that you can PEEK (POKE) it also at it's mirror (add+16384, add+32768, add+49152) and you will find.... the same memory cell!
There is no "hole" into a C16 that can be filled by a RAM expansion.....
no RAM expansion can be done (without modify HW): you have to PAY/BUY a more expensive PLUS4.... ;-)

Only intercepting the TED /CAS pin (HW modify...) is possible to manage the RAM memory map and expand it, for example: https://plus4world.powweb.com/hardware/Hungarian_64K_Expansion


The external cart RAM expansion can be of 3 types:
1) a simple 64K external RAM,
but it can work properly only if you modify your C16 disabling the internal bank ( https://plus4world.powweb.com/hardware/64K-RAM_Speichererweiterung) but without the cart your C16 is without RAM memory, so the expansion had to be always connected: you loose the cart connector (no other cart can be connected without a multi port expander)

2) the cart can force the TED /CAS line to a not operative level for avoid the internal RAM activity(this appeared to use this technics: https://plus4world.powweb.com/hardware/C16_RAM_Pack) but the price is to short circuiting an important pin of the TED and it's not a wonderful idea for TED longevity....

3) the cart expands the memory using the space that the original system provides: the external cart ROM space.
https://plus4world.powweb.com/hardware/SRAM_Card_256Kb


1)+2) are normally oriented to expand a C16 to mimic a PLUS 4, but "3)" is a technique that can improve a PLUS4 too

C264 JOLLY CART solution is a "3)" that use the 16K external ROM areas for covering them with RAM/ROM pages.
264 machine expect that those areas are covered by ROM, so if you read on the enabled external area the external area is read,but if you write on enabled external areas the write operation will be performed exclusively on the internal RAM address (on C16: on all 4 mirrored address!).
The simplest way to write to external ram is to enable it when a write operation on its address is decoded on the BUS:
the write operation will be done to internal RAM and ALSO external RAM at the cost of losing 16k(32k) of internal RAM (on C16: the total internal RAM!)
the "c264 jolly cart" system can write on external RAM in this way but can also in indirect way for preserve the internal RAM integrity.

Posted By

javierglez
on 2022-12-30
12:55:13
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

I thought 16kB memory expansions for the C16 were available at the time, although I've never seen one on eBay.
I understand now they were kind of a hack. With no support from Commodore, they probably were not available at all in most countries.
It's interesting that the C16-32kb tier covers very few actual units.
And although C16 wasn't a hit in Spain, units keep showing up in 2nd hand marketplaces (+4 wasn't sold here).
I see unless you are interested in the C16 from the beginning, there's not many chances you get past plain 16kb software.
I mean, unless you are into fixing stuff, you can't have a memory expansion, just spend 50€ and in 2 days move on. Like for example if you don't want to mess with tapes and you get a SD2IEC.

Posted By

Litwr
on 2022-12-30
14:25:45
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

I used 32KB and 64KB RAM expansion cards with my unmodded C16, they worked perfectly.

Posted By

MCes
on 2022-12-31
04:19:02
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

@Litwr
Your expansion cart are probably of type "2)"....
I assume you have used them with SWs that need more than 16k ram.
Can you post pictures of the internal pcb of them?

Posted By

Litwr
on 2022-12-31
12:08:49
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

IMHO those cards just add their memory to the C16 memory.
I used 16 To 64
I can't find my second card that added 16 KB in the plus4world list. Sorry I didn't shot it before I sent all my C16 bundle to a museum because my C16 stopped working. sad I hope to find my former bundle in this museum later in the next year and make a photo.
However just look at +16KB cards - you can notice that those cards have 16 KB RAM, not 32 as you probably suppose.

EDIT. My +16KB card was likely 16K Expansion (Kingsoft)

Posted By

MCes
on 2023-01-03
06:08:59
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

@Litwr
Your situations may be within my previous analysis, sadly also a fried TED.....

@Majikeyric
If I understood well you are a sw developer, so I have to ask you a curiosity:
I'm looking for a single byte in page zero that I want use without problems for the operating system and other SW....
I'm thinking $2A or $52 or $5C… what's your suggestion?

Posted By

siz
on 2023-01-03
08:54:36
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

Hi @MCes, I just made some photos of my 64k RAM expansion. This is probably a method 2 solution (drives against TED). I've uploaded the files here: https://photos.app.goo.gl/6VvzWgVtWzjztxeU6

edit: this is probably the same as 16 To 64

Posted By

MCes
on 2023-01-12
06:59:15
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

@siz
As expected this expander lock the CAS signal (to deselect the internal C16 RAM) and detects signal contention to enable the RAM on the cart.
Chips are on bottom side of the cart, and there is the place for add a couple of 16k ROM that with jumper can be selected by C1L,C1H,C2L,C2H.


-----------------------------------------

Okay,
the feasibility study continues....
An intercept point between HW simplicity and performance could be the following description.

READ on it:
Imagine a cart that responds as "C1" (C1L,C1H) and is read in normal mode, as if it were 2x16k ROM.
Inside there are 1 static RAM (to512k) and 1 EEPROM (to512k), both of them are selectable in 32slices 16k deep.
In I/O area there are some register that can be: RCL/RCH (optionally: RTED)......
those registers contains information about which page (and if RAM or EEPROM) has to be enabled when a reading is performed respectively by:
C1L,C1H, (if TED fetch on C1, in this case a specific bit can deselect this option allowing standard TED read addressing).

WRITE on it:
For the write activity I am choosing a 256 byte area in the I/O space to be used for data projection onto the cartridge memories.
This "window" is the space $FD80-$FE7F.
You will be able to write into any 256byte-page of the 2x512k chips on cart.
The address will be formed as:
0-7 the displacement within the I/O buffer
8-15 a specific cart register "WP" (P as page number )
16-18 a specific cart register "WB" (B as block number)
Into WB register there is also a bit that identify if the target is the RAM or the EEPROM chip.

so the CPU can read/fetch data from 32k by 2 different slices (C1L, C1H),
TED can fetch graphics data from a specific no cpu-selected area inside 1MByte (this is an option) and
CPU can write to specific selectable area within 1MByte....
without having to dynamically update any registry!

The question to software developers: could this be a useful tool?

tips?

Posted By

siz
on 2023-01-12
10:33:53
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

please refer to plus4encyclopedia/500249 for free addresses. for example at $fdd0 the ROM banking register will conflict with your proposed solution. Perhaps you should use a 128 byte long window from $fe00-$fe7f and do a NeoRAM (implemented in SideKick) compatible solution so the (although very few) existing software using that can run on your hardware too.

Posted By

Majikeyric
on 2023-01-12
12:57:39
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

@Majikeyric
"I'm thinking $2A or $52 or $5C… what's your suggestion?"

Hi,
I never use system so for me all zero page addresses are available...
But all 3 are used by BASIC it seems.

In the range $D8-$E8, it is more safe as it seems they are never used.

To help you can have a look at EXCELLENT SVS's Ultimate map

Posted By

MCes
on 2023-01-13
12:03:15
 Re: "c264 jolly cart" system: a new RAM/ROM external expansion cart.

@Majikeyric
Thanks for the link, I had already noticed that wonderful work (SVS's Ultimate map)!

@siz
You are absolutely right:
I was too busy looking at the moon and fell down the well!

I think 256 bytes of writable area is the minimum for a simple and efficient write procedure that wants to move blocks of data,
so I'm thinking another way to write onto external 1 MByte (512k RAM+512k EEPROM),
for example immagin to load a register (WS: Writing Slice) that as the precedent (RCL,RCH,RTED) indicate the targhet:
RAM/EEPROM, and wich of 32 slice has to be wrote (independently if this slice is enabled to be read by CPU or TED).
now the "16k internal displacement" needs to be passed to the cart and it will done simply writing any data to the equivalent 16k displacement inside the area $C000-DFFF (also if cart is deselected).
Now we have the full-MByte address ready and it's possible to write on it simply writing in a specific cart register (WD Writing data),
Surprise: the data you are writing to the WD register will be written to the 19+1 bit address (WS+16k displacement)
and at the end of this operation the last 8 bits of the address will be incremented pointing the new WD write activity to the address next in the memory cart,
this will have a high efficiency in the routine that moves blocks of memory because inside the index cycle you has only to load with index and store without index


cycle LDA [source],X
........STA WD
........INX
........BNE cycle

registers area: inside $FDF0-$FDF7 or inside $FDF8-$FDFD

Can it be a good solution? Tips?




Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024