What does the inside of a REU look like to C128 software?

Started by gsteemso, May 18, 2008, 03:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gsteemso

The following suggest themselves as obvious:

30-pin SIMMS (the 8-bit-wide kind) are so obsolete as to be essentially free.
Cartridge cases and prototyping boards are less so, but still commonly available on eBay.
REUs are hard to find and expensive to obtain once you do.

There is almost nothing in the Commodore REUs, just RAM chips and some glue-logic chips AFAICT.

So, why not roll my own? The trouble is, I have no idea what I'd need to do to make it compatible with all the existing ones, like the Commodore ones and the SuperCPU's RAMCard and the 1750XL and so on and so forth. What sort of API do they present? Do I need to graft the thing in to the C128 memory map at some certain range of addresses? How does it work?
The world's only gsteemso

BigDumbDinosaur

Quote from: gsteemso on May 18, 2008, 03:36 PM
The following suggest themselves as obvious:

30-pin SIMMS (the 8-bit-wide kind) are so obsolete as to be essentially free.
Cartridge cases and prototyping boards are less so, but still commonly available on eBay.
REUs are hard to find and expensive to obtain once you do.

There is almost nothing in the Commodore REUs, just RAM chips and some glue-logic chips AFAICT.

So, why not roll my own? The trouble is, I have no idea what I'd need to do to make it compatible with all the existing ones, like the Commodore ones and the SuperCPU's RAMCard and the 1750XL and so on and so forth. What sort of API do they present? Do I need to graft the thing in to the C128 memory map at some certain range of addresses? How does it work?

The key to the REU's operation is its custom DMA controller, not the RAM or glue logic.  Your questions would be best answered by perusing the Commodore 128 programmer's reference guide, as well as other literature that is available here.  Trying to explain the REU in a post is a bit like trying to explain the workings of the stock market in a 100 word essay.

BTW, calling this device a "RAM expansion unit" is technically incorrect, as it does not appear anywhere in the 128's memory map other than as a few registers in the I/O block.
x86?  We ain't got no x86.  We don't need no stinking x86!

airship

QuoteBTW, calling this device a "RAM expansion unit" is technically incorrect, as it does not appear anywhere in the 128's memory map other than as a few registers in the I/O block.

While what you say is true, these units have been called REUs since the beginning. They even have "RAM EXPANSION" stamped on their cases. The reason they're so lame is that they were made to be C64-compatible, which couldn't do banks like the C128. The reason they're so great is because of the super-speedy DMA controller. Why they didn't build THAT into the C128 is beyond me. It would have made banking much more fun.

Trying to figure out just how CBM's REUs' DMA controllers work has worn down many a fine Commodore hacker. (Hey! THREE acronyms in a row! Bonus points for a double possessive! I win!)
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

BigDumbDinosaur

Quote from: airship on May 19, 2008, 06:56 AM
While what you say is true, these units have been called REUs since the beginning. They even have "RAM EXPANSION" stamped on their cases.

I know they have been, which never should have been the case.  Oops!  Accidental pun!

CBM should have made it possible to add RAM to the interior of the 128, accessible through MMU register twiddling.  The REU was, in my dinosaurish opinion, a poor substitute.

At one time I was looking at trying to use the DMA controller in the REU to interface with an NCR 53C90A SCSI ASIC as part of an upgraded Lt. Kernal host adapter.  Unfortunately, CSG was unwilling to provide the needed technical info about the DMA controller and the project never got past the head-scratching stage.
x86?  We ain't got no x86.  We don't need no stinking x86!

RobertB

Quote from: airship on May 19, 2008, 06:56 AMWhile what you say is true, these units have been called REUs since the beginning. They even have "RAM EXPANSION" stamped on their cases.
Bil Herd corrected me when I called them "ram expansion units".  He said they (the engineers) always called them "ram expanders".
Quote from: airship on May 19, 2008, 06:56 AMTrying to figure out just how CBM's REUs' DMA controllers work has worn down many a fine Commodore hacker.
I wonder how far Adrian "dW" Gonzalez has progressed in cloning the REC chip.  I should send him an e-mail.

         Truly,
         Robert Bernardo
         Fresno Commodore User Group
         CommVEx v4 website - http://www.portcommodore.com/commvex

Andrew Wiskow

Unless I'm mistaken, I believe Mangelore is working at making his own RAM expander, based on the design of CMD's 1750XL.

-Andrew
Cottonwood BBS & Cottonwood II
http://cottonwood.servebbs.com

bacon

Gideon Zweijtzer has included a 1750-compatible REU in the 1541 Ultimate, presumably re-impmenting the DMA controller in the FPGA together with the 1541 electronics and mechanics. He has vowed to eventually make the FPGA core open source, IIRC. Using an FPGA with the REU part of Gideon's core is probably the way to go.
Bacon
-------------------------------------------------------
Das rubbernecken Sichtseeren keepen das cotton-pickenen Hands in die Pockets muss; relaxen und watschen die Blinkenlichten.

RobertB

Quote from: bacon on May 20, 2008, 12:38 AM
Gideon Zweijtzer has included a 1750-compatible REU in the 1541 Ultimate, presumably re-impmenting the DMA controller in the FPGA...
From where did you get that information?

           Truly,
           Robert Bernardo
           Fresno Commodore User Group
           CommVEx v4 website - http://www.portcommodore.com/commvex

8502

Quote from: Andrew Wiskow on May 19, 2008, 11:57 PM
Unless I'm mistaken, I believe Mangelore is working at making his own RAM expander, based on the design of CMD's 1750XL.

The CMD 1750XL uses the same custom DMA controller chip as Commodore's 1750, which no-one has successfully cloned so far.
c128dcr  |  1581  |  1750  |  1084s  |  1351  |  mmc64  |  super-g  |  competition pro

Mark Smith

Quote from: RobertB on May 20, 2008, 01:48 AM
Quote from: bacon on May 20, 2008, 12:38 AM
Gideon Zweijtzer has included a 1750-compatible REU in the 1541 Ultimate, presumably re-impmenting the DMA controller in the FPGA...
From where did you get that information?



If you tootle over to http://www.1541ultimate.net you shall see for yourself ... plus I have in my grubby mitts a 1541Ultimate with 32Mb of RAM and it does indeed give you an REU of up to 16Mb in size :-)

Go order one now .. you know you NEEEEEEEDDDDD it! ;-)

Mark

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

Commodore 128, 512K 1750 REU, 1581, 1571, 1541-II, MMC64 + MP3@64, Retro-Replay + RR-Net and a 1541 Ultimate with 16MB REU, IDE64 v4.1 + 4GB CF :-)

RobertB

Quote from: Mark Smith on May 20, 2008, 06:23 AM
If you tootle over to http://www.1541ultimate.net you shall see for yourself ...
Specifically, I was asking if a DMA controller was implemented (cloned) in the 1541 Ultimate.  I see no evidence of that at the website.  However, if I meet up with Gideon in mid-June, I will ask him directly.
Quote from: Mark Smith on May 20, 2008, 06:23 AM...it does indeed give you an REU of up to 16Mb in size
There has been no verification that GEOS/Wheels makes full use of the 1541 Ultimate's 16 meg (unlike the full use of a RAMLink with 16 meg or a SuperCPU with 16 meg).  The only verification I have is that 2 megs is usable with GEOS/Wheels.
Quote from: Mark Smith on May 20, 2008, 06:23 AM
Go order one now .. you know you NEEEEEEEDDDDD it! ;-)
Heh, today I ordered another MMC2IEC (with SD2IEC firmware) from NKCElectronics.com   At $45 US (not including postage), that is an easier price with which I can live.  This extra board will be a gift to a European friend.

           Truly,
           Robert Bernardo
           Fresno Commodore User Group
           CommVEx v4 website - http://www.portcommodore.com/commvex

airship

Robert, the MMC2IEC looks very promising. I assume it uses little enough current that you could steal the DC supply voltage it needs from the user port?
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

RobertB

Quote from: airship on May 21, 2008, 01:25 AM
I assume it uses little enough current that you could steal the DC supply voltage it needs from the user port?
Yes, IIRC it is less than 200 milliamps, and so getting power from the user port is possible.

           Truly,
           Robert Bernardo
           Fresno Commodore User Group
           CommVEx v4 website - http://www.portcommodore.com/commvex

gsteemso

Cheese, what a nuisance. Does anyone know who currently owns the design for the REC chip? If they could be persuaded to release it (or at least its design parameters) into the public domain, a lot of things would get easier.
The world's only gsteemso

BigDumbDinosaur

Quote from: gsteemso on May 21, 2008, 03:34 PM
Cheese, what a nuisance. Does anyone know who currently owns the design for the REC chip? If they could be persuaded to release it (or at least its design parameters) into the public domain, a lot of things would get easier.

<Grin>  Commodore Semiconductor Group owns the REC design.  Let us know if you are able to contact them.
x86?  We ain't got no x86.  We don't need no stinking x86!

bacon

Quote from: RobertB on May 20, 2008, 03:05 PM
Quote from: Mark Smith on May 20, 2008, 06:23 AM
If you tootle over to http://www.1541ultimate.net you shall see for yourself ...
Specifically, I was asking if a DMA controller was implemented (cloned) in the 1541 Ultimate.  I see no evidence of that at the website.  However, if I meet up with Gideon in mid-June, I will ask him directly.
Note that I used the word "presumably". Since the REU in the 1541 Ultimate is 17XX compatible (AFAIK), it's reasonable to presume that the functional equivalence of the REC chip, or at least enough of it to make it compatible, is implemented in the FPGA. By what other mechanism do you propose that he might have made the REU compatible?
Bacon
-------------------------------------------------------
Das rubbernecken Sichtseeren keepen das cotton-pickenen Hands in die Pockets muss; relaxen und watschen die Blinkenlichten.

RobertB

Quote from: bacon on May 22, 2008, 01:33 AM
Note that I used the word "presumably".
Since you cannot wait until I talk to Gideon face-to-face, I have sent him an e-mail.  I'll let you know the results.

          Truly,
          Robert Bernardo
          Fresno Commodore User Group
          CommVEx v4 website - http://www.portcommodore.com/commvex

bacon

Oh, I can wait. I was just engaging in some idle speculation.
Bacon
-------------------------------------------------------
Das rubbernecken Sichtseeren keepen das cotton-pickenen Hands in die Pockets muss; relaxen und watschen die Blinkenlichten.

Golan Klinger

Quote from: bacon on May 22, 2008, 01:33 AM
Since the REU in the 1541 Ultimate is 17XX compatible (AFAIK), it's reasonable to presume that the functional equivalence of the REC chip, or at least enough of it to make it compatible, is implemented in the FPGA.
It is compatible and your presumption is both reasonable and accurate. This appears to be a case of someone not having the technical savvy to comprehend the matter they're discussing.
Call me Golan; my parents did.

RobertB

Quote from: Golan Klinger on May 22, 2008, 11:44 PM
It is compatible and your presumption is both reasonable and accurate. This appears to be a case of someone not having the technical savvy to comprehend the matter they're discussing.

From:     Gideon Zweijtzer
Date:     Thu, May 22, 2008 1:22 am


Hi Robert!

What a surprise to hear from you! It has sure been a long time since we
have met. If you are there on the Commodore Show in Maarssen on June 21,
then I'll make sure that I'll be there, too. I would love to know about
the 'scene' in the USA.

> In the 1541 Ultimate Plus, you have implemented a ram
> expander; question - is it an exact clone of the
> Commodore 17xx Ram Expansion Unit?  Have you been
> able to duplicate the functions of the REC chip
> within the Commodore 17xx Ram Expansion Unit?

The basic answer is "yes". The 1541U+ has a 17xx compatible RAM expander
mode, with selectable amount of memory. I have successfully tested it with
some programs, but now that the 1541U+ is "in the field", there are some
problems still with the REC emulation, still. This will be addressed soon,
now that I have an actual 1764 on my desk.

Gideon

gsteemso

Quote from: BigDumbDinosaur on May 22, 2008, 12:32 AM
Quote from: gsteemso on May 21, 2008, 03:34 PM
Cheese, what a nuisance. Does anyone know who currently owns the design for the REC chip? If they could be persuaded to release it (or at least its design parameters) into the public domain, a lot of things would get easier.
<Grin>  Commodore Semiconductor Group owns the REC design.  Let us know if you are able to contact them.

AFAIK CSG is defunct. When I asked who owned it, I meant "Who owns it -now-?"
The world's only gsteemso

Blacklord

Did the patents for all of CSG's chips end up with GMT Microelectronics Corporation ? Who bought their assets when they went into liquidation ?

airship

Well, after considerable research I've found that the EPA considers Rockwell Automation (formerly Allen-Bradley) to be the 'responsible party' in ongoing Superfund cleanup operations at the GMT Microelectronics (Commodore Semiconductor) site. Since the documents say only that GMT Microelectronics was 'liquidated' by EPA order, one can assume that Allen-Bradley bought their assets lock, stock, and barrel. So if anyone owns the rights to the CBM chips (including the REU), it has to be Rockwell Automation.

However, my guess is that they dumpsterized the documentation for them, as they were probably only interested in the physical plant.

That being the case, old engineers like Bil Herd remain our best hope for uncovering that kind of information. As with most of this old stuff, I think who owns it is pretty much moot. Even if a company KNOWS they own the rights, it's highly unlikely they would come after a hobbyist for resurrecting it.

As one example, INFO went bankrupt and the bank seized our assets, but they were really only interested in the computers and office equipment that they could sell off at the liquidation sale. Though they technically own the rights to our words, I doubt they'd come after us even if we compiled and sold a 'Best of INFO' book, since the revenues would not equal the legal costs.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

commodorejohn

#23
Quote from: BigDumbDinosaur on May 19, 2008, 01:40 PMCBM should have made it possible to add RAM to the interior of the 128, accessible through MMU register twiddling.  The REU was, in my dinosaurish opinion, a poor substitute.
This actually is possible. I can't remember where, but I have seen hobbyist instructions for expanding a 128 to 256KB of internal RAM.

Edit: Ah, found it. Looks like you can actually push it all the way up to 1MB, holy cow.

airship

Too lazy to go look right now, but if I remember right that mod needs a second MMU, which you'd have to pull from another C128. If CBM had fully implemented the MMU's internals and added some RAM sockets, as I understand it you could have gone to 256K onboard.
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine