Author Topic: 2 Mega Byte Memory expansion  (Read 7731 times)

0 Members and 1 Guest are viewing this topic.

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
2 Mega Byte Memory expansion
« on: 03:47, 25 December 16 »
Hello Everyone,

While I have developed the beginning of an SPI interface (principally for an SD card), I have also developed a schematic for a 2 Mega byte memory expansion (See PDF attachment).
This schematic makes use of the LYONTEK 1 MB SRAM chip (PDF attached) which allows for 5V TTL voltages and its speed is similar to the existing DRAM. The SRAM chip is an SMD meaning that its surface mounted and so no sockets can be used  :( .

The PAL which goes with the memory expansion is similar to what i posted before in that it will simply add a 3-6 ns delay to the memory read/write functions. It performs a simple decode of the configuration to determine how to manage the A15/A14 address lines. It should support all Dk'Tronics memory modes. With no need for memory refresh the PAL should be simple to implement.
The combination program for the PAL should be easy to produce in hex so that others can implement the memory expansion.

A check on the farnell website (as of 24Dec16) for the current availability of the RAM chips shows that it is available and the chips are about $21 (AUS) to buy.

I recently purchased a Universal programmer which can now program EPROMS and PAL/GAL chips (along with other programmable devices). So the memory expansion should not be a problem to complete.

Once the board is checked and built to work as expected, I will put up the PCB as well to let others build the board or I can make one with less parts the users can purchase and source the rest for themselves. I will also look at making it MX4 usable as well.

With both of these boards it makes it possible to further complete my development for the web browser which is consuming more memory as development expands.

rpalmer

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #1 on: 01:20, 01 January 17 »
hello everyone,

I have been working to get the PAL program sorted out and here it is.
I am in the process of checking to see if all is okay and will update as and when it is required.

The expansion wont entirely work for configuration #3 as it requires direct influence of the Z80 address. It does work on 6128's as this is internal whereas for the 464/664 it is not possible unless there is some modifications to the motherboard to allow for this (which I would not advise at all!). Also this mode does not seem to be very useful to me, since the re-mapping of base memory addresses from &c000 to &4000 seems like a defect rather than intentional, although I guess someone has found a use for it.

The GAL equations are configured for the memory expansion having 2 x 1Mb SRAM chips. There is a possibility of an expansion to 4Mb using 2 x 2Mb SRAM chips, however these are more expensive and harder to come by at 5V.

rpalmer

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 841
  • Liked: 403
  • Likes Given: 71
Re: 2 Mega Byte Memory expansion
« Reply #2 on: 03:36, 01 January 17 »

Also this mode does not seem to be very useful to me, since the re-mapping of base memory addresses from &c000 to &4000 seems like a defect rather than intentional, although I guess someone has found a use for it.
RAM configurations 1, 2 & 3 make the most sense when you realise they are meant to be used together, with a static code block in page 7. This allows easier access to the full memory range than the more "usual" configurations 4, 5, 6 & 7 where you can only ever access a single page of banked memory at any one time. It might have been nicer if page 7 had ended up sitting at #0000 instead of #C000, because then you could have more easily used IM 1 without having to worry about paging the routine out, but thems the breaks I guess.


I'd hazard a guess than configurations 1 & 3, in particular, were very carefully selected so that you can have a screen display at #4000 that is double buffered and switch between them without having to worry about address changes between frames.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.373
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2574
  • Likes Given: 1506
Re: 2 Mega Byte Memory expansion
« Reply #3 on: 14:15, 01 January 17 »
Also this mode does not seem to be very useful to me, since the re-mapping of base memory addresses from &c000 to &4000 seems like a defect rather than intentional, although I guess someone has found a use for it.
Some programs like FutureOS, Pac-Man emulator and Phortem use the "C3" mode for a nice double buffer result.
If I remember well, CP/M test it to run. If yes, it is intentionnal and not a defect. Sure, you don't require it for your own usage.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #4 on: 23:19, 01 January 17 »
hello Toto,

What is Phortem?
It would interesting to know how this "double" buffer works. I suspect that SymbOS makes use of this mode too.

rpalmer

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 841
  • Liked: 403
  • Likes Given: 71
Re: 2 Mega Byte Memory expansion
« Reply #5 on: 23:30, 01 January 17 »

Screen 1:
Gate array fetching screen from page 1 (i.e. bits 4&5 of CRTC R12 = 01), ram combination C3


Screen 2:
Gate array fetching screen from page 3 (i.e. bits 4&5 of CRTC R12 = 11), ram combination C1


This allows you to write to the next frame at #4000 without having to worry about which of the screens it is. Then when you're ready, flip both the GA screen source and the ram paging and you're all set up to start drawing the next frame.

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 830
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 554
Re: 2 Mega Byte Memory expansion
« Reply #6 on: 02:05, 02 January 17 »
The expansion wont entirely work for configuration #3 as it requires direct influence of the Z80 address. It does work on 6128's as this is internal whereas for the 464/664 it is not possible unless there is some modifications to the motherboard to allow for this (which I would not advise at all!). Also this mode does not seem to be very useful to me, since the re-mapping of base memory addresses from &c000 to &4000 seems like a defect rather than intentional, although I guess someone has found a use for it.
IIRC the #C3 mode was used for enabling upper ROMs to access (read) the usual screen ram located at #C000.

I suspect that SymbOS makes use of this mode too.
No, SymbOS is only using #C1,#C2 and #C4-#C7. Fortunately I don't need #C3 (SymbOS is not ROM-based) as #C3 is not supported by the 464/664 and several memory expansions.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #7 on: 03:22, 02 January 17 »
thanks andycadley and prodatron to explain some things.

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #8 on: 08:06, 02 January 17 »
Hello everyone,

I have just completed checks for the expansion PAL using WinCUPL and find that the attached updates appear to work as expected.
All I now need to do is build and test the expansion board in real life (here hoping all is okay too!).

Included is the simulation test inputs to WinSIM that were used to verify the PAL equations

To use in WinCUPL remove the '.txt' extension.

WinCUPL is a free to download just google it.

rpalmer

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #9 on: 11:22, 03 January 17 »
Hello everyone,

Attached is the updated 2 Mbyte memory expansion schematic to work the previously released PAL code.
The changes from the previous version were to separate the CE1/CE2 lines so that the PAL can select the correct SRAM chip.

The construction of the board will be MX4 capable (which I am currently checking). The PCB from eagle will also be published once all is checked, built and tested.

rpalmer

Offline Munchausen

  • 6128 Plus
  • ******
  • Posts: 774
  • Country: gb
  • Liked: 211
  • Likes Given: 215
Re: 2 Mega Byte Memory expansion
« Reply #10 on: 12:56, 03 January 17 »
@rpalmer this is great, so nice to have an open memory upgrade available! About the 3-6ns delay, is this normal for RAM expansions? Is it due to the RAM speed? Or the PAL? Does it affect all the memory?

Cheers!

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #11 on: 13:45, 03 January 17 »
Munchausen,

The delay is due solely to the propagation delays in the PAL to minimize any impact to timings to access the SRAM. As there is no feed back to the PAL the configuration setting is fixed and only handling a small number of control lines make the whole process simple.
The internal DRAM is 50-75 ns and the LYONTEK is about 55ns which is the ball park of the speed of the DRAM.

rpalmer

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.373
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2574
  • Likes Given: 1506
Re: 2 Mega Byte Memory expansion
« Reply #12 on: 14:43, 03 January 17 »
this is great, so nice to have an open memory upgrade available!
All my boards should be "open" to save my soldering days...
Sadly, we know that will made malicious peoples using those schematics to sell them up to four times the expected price.

Now, as nobody really use the 512K RAM I don't see the need to release more only to sell boards ; It is not my goal.
I like the rpalmer idea to build all his boards himself for his project. Congratulations!  8)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Kris

  • 6128 Plus
  • ******
  • Posts: 551
  • Country: fr
  • Team Impact
  • Liked: 220
  • Likes Given: 810
Re: 2 Mega Byte Memory expansion
« Reply #13 on: 14:54, 03 January 17 »

Now, as nobody really use the 512K RAM


I don't agree with you: I'm quite sure that 99% of the users of your boards don't give you any feedback on how they are using it...ie: From my side, I use the 512 Ko to store several pictures for mockup trials and it is very nice.
I'm confident that other people are using those 512Ko in differents cases; in addition, there are already some minors production that use 512Ko and more (a-ha Demo from Markus; games cracked by Chany that are loaded in 1 pass into the RAM....)


« Last Edit: 16:36, 03 January 17 by Kris »

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 830
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 554
Re: 2 Mega Byte Memory expansion
« Reply #14 on: 15:38, 03 January 17 »
Now, as nobody really use the 512K RAM
I am using the expanded RAM every time I turn on my CPC and boot SymbOS  :D

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.373
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2574
  • Likes Given: 1506
Re: 2 Mega Byte Memory expansion
« Reply #15 on: 17:18, 03 January 17 »
I don't agree with you: I'm quite sure that 99% of the users of your boards don't give you any feedback on how they are using it...
That is wrong... When peoples order my boards, they mostly explain to me their expected usage to know if the board will be appropriated.
About the X-MEM, they mainly want a ROM board. Next, a RAM expansion to allow to run 6128 programs on 464/664.

By the way, when I said "nobody really use the 512K RAM", I was more speaking about new programs taking part of this memory amount.
Only one new program was released these last 3 years: Orgams. IMHO, it is really few to think that users require more. (except dedicated usages)

Sorry for the unintentional off topic.
« Last Edit: 18:33, 03 January 17 by TotO »
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 830
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 554
Re: 2 Mega Byte Memory expansion
« Reply #16 on: 18:05, 03 January 17 »

That is wrong... When peoples order my boards, they mostly explain to me their expected usage to know if the board will be appropriated.

About the X-MEM, they mainly want a ROM board. Next, a RAM expansion to allow to run 6128 programs on 464/664.

By the way, when I said "nobody really use the 512K RAM", I was more speaking about new programs taking part of this memory amount.
Only one new program was released these last 3 years: Orgams. IMHO, it is really few to think that users require more. (except dedicated usages)

There are some more, which appeared during the last few years and require more than 128K: UnZip, syMIRC, WGet, Telnet, Columns, BattleShip etc. etc. They won't run without X-MEM or another standard memory expansion. Yes, it's all SymbOS stuff and sometimes people don't seem to feel that it can be counted as "CPC software" (which is wrong of course, as it is CPC software indeed).

That makes me wonder, what released software ever supported/used >128K in CPC history.
This is what I know:

- RAM discs (several ones for Amsdos and CP/M)
- disc copy tools (Discology, Crime, Disc'o'Magic etc.?)
- SymbOS + all apps (currently ~40)
- Orgams
- my old crappy CPC Word
- some movies by Devilmarkus and TFM

 (without the cracks mentioned by Kris)

What else?

The problem is, that the CPC-OS never supported the management of the memory beyond 64K. That's probably one reason why memory expansions were mainly used as ram discs but not as extended data/code memory for applications, which is sad as it can be used in a great way for additional code etc.
MSX-DOS (MSX2 etc.) and EXOS (Enterprise 64/128) include full extended memory management, and so much more people here use(d) RAM expansions up to 4GB.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.373
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2574
  • Likes Given: 1506
Re: 2 Mega Byte Memory expansion
« Reply #17 on: 19:15, 03 January 17 »
Not enough new programs, because many peoples (users and coders) continue to think that must run on a 64K or 128K stock machine.

We have patched the existing original protected Discology 5.1 and 6.0 to support a 512K buffer. (allow to copy a 3"1/2 80 tracks side in one pass)
We have patched the existing CP/M ROM to allow to support the same RAM Drive capacity (256K or 448K) than BASIC or Disc'o'Magic.
For me, the nice SymbOS applications was mostly already existing before the X-MEM, with the Symbiface II.
Cracked games are existing programs too... We should stop here and continue by PM if required.  ;D

"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 337
  • Country: fr
  • Liked: 268
  • Likes Given: 1
Re: 2 Mega Byte Memory expansion
« Reply #18 on: 10:15, 04 January 17 »
The Parados file manager will use the extra RAM for 1-pass disc copy too. I'm not sure if it detects 512K or stops at 256K, but it's easy to check.

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #19 on: 02:00, 05 January 17 »
hello everyone,

I have ordered 10 boards to be made via www.pcb-pool.com as suggested by bryce.
Hopefully they will be available soon.

Attached is the PCB from eagle for those more adventurous to do the build themselves.

rpalmer

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 416
  • Country: au
    • 8bitology
  • Liked: 196
  • Likes Given: 113
Re: 2 Mega Byte Memory expansion
« Reply #20 on: 05:23, 19 January 17 »

With both of these boards it makes it possible to further complete my development for the web browser which is consuming more memory as development expands.

rpalmer

Web browser :)  you might like to visit my site at 8bitology.com which I am also working on a CPC web browser among other things.  Here is my JS prototype responsive browser rendering logic https://jsfiddle.net/zhulien/dw1zpgs2/ .  So pages render correctly in any resolution.

http://8bitology.com/example.php is an example 8bml page rendered in html (for inefficient computers)
http://8bitology.com/8bitmarkup.php?8bml= (and again in raw 8bml for more efficient computers)
http://8bitology.com/8bitmarkup.php?8bml=&rendersize= (and again with stats)

PHP libraries are already completed to allow anyone to make their websites CPC/8BML friendly, and i 'hope' that some sites will adopt it such as CPC and other 8bit software repositories so we can easily download software on the actual machines themselves.

Also, please PM me with a quote on qty 4 and qty 8 of these 2mb boards. Thanks
« Last Edit: 20:47, 19 January 17 by zhulien »

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #21 on: 13:18, 19 January 17 »
zhulien,

The last 2 link only display text in firefox.
Is that the intended behavior?

Do note the for CPC web browser there is going to be a lot of effort to get more than HTML as stuff like Java, PHP, etc are going to take way more effort than the HTML itself and require standard to be met.

rpalmer


Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.942
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3859
  • Likes Given: 395
Re: 2 Mega Byte Memory expansion
« Reply #22 on: 13:48, 19 January 17 »
zhulien,

The last 2 link only display text in firefox.
Is that the intended behavior?

Do note the for CPC web browser there is going to be a lot of effort to get more than HTML as stuff like Java, PHP, etc are going to take way more effort than the HTML itself and require standard to be met.

rpalmer

Remove the bits from the "?" onwards in the links and they work.

Bryce.

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 416
  • Country: au
    • 8bitology
  • Liked: 196
  • Likes Given: 113
Re: 2 Mega Byte Memory expansion
« Reply #23 on: 20:46, 19 January 17 »
zhulien,

The last 2 link only display text in firefox.
Is that the intended behavior?

Do note the for CPC web browser there is going to be a lot of effort to get more than HTML as stuff like Java, PHP, etc are going to take way more effort than the HTML itself and require standard to be met.

rpalmer


That is the correct behaviour.  it is showing in 8bml so the websites created using the PHP libraries on the site will render in html on PCs and 8bml on CPCs... the JS link is a POC in JSFiddle that is parsing 8bml in different resolutions.


The 3 links above... the first rendered in html on your PC. The 2nd and 3rd are raw 8bml of the same html page, firstly as the CPC will receive it before rendering, secondly the same but with the byte count at the end so you know how much ram it will take when you develop the page.


Full documentation of the 8bml is here:  http://8bitology.com/files/8bmlref.txt


The 8bml PHP utils are here also: http://8bitology.com/8bitmarkup.php


In fact the whole 8bitology site is coded in PHP and will supply either html or 8bml (if the 8bml parameters is provided on the URL).


Another sample page:


http://8bitology.com/example.php
http://8bitology.com/example.php?8bml=
« Last Edit: 20:55, 19 January 17 by zhulien »

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 541
  • Country: au
  • Liked: 362
  • Likes Given: 18
Re: 2 Mega Byte Memory expansion
« Reply #24 on: 22:45, 19 January 17 »
I have just received a note from DHL to redeliver some of the bits for the board and will soon get the PCBs to begin building and testing.