News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_PulkoMandy

Gemini 1MB RAM expansion for Amstrad Plus

Started by PulkoMandy, 20:34, 08 October 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PulkoMandy

Then I don't see where there is an issue. I am not denigrating anyone or anything, I have a compatibility problem, I found it interesting, I found a way to solve it. And I learnt a few things in the process about how the ASIC lock works and how to implement it using simple logic.

I just explained why and how the existing expansions don't behave the same as the internal RAM of the 6128+. I don't think this is denigrating, just looking at the facts. It would be denigrating if I said it was caused by incompetence of the designers, but I don't think this is the case. Either they couldn't know (for the DK Tronics which was designed before the Plus machines) or they decided to do it this way for a variety of possible reasons (they don't agree with me on what the correct behavior is, they wanted to simplify their hardware and save costs, they don't care about Plus machines, ...). That's all. These concerns are valid, I could do the expansion with just 3 chips instead of 5 if I didn't need to handle the ASIC lock and unlock. But that's not what I wanted to do.

Now everyone can decide which expansion they want to get, mine, yours, someone else's or none at all. But I made clear what the limitations (or call it design choices if you want) of each solution are.

eto

#26
Honestly, I had no idea about this until a few days ago. I never used a RAM extension on my Plus but I would be furious if it would be harmed because there is no warning, although software or hardware developers were aware of it. It seems it's widely known within the expert community, but it's not mentioned on any WIKI page about RAM extensions and when looking at currently available RAM extensions they also often mention the Plus although it's clearly not (fully) true.

If such a situation is known, it has to be handled. Until now it could only be done by software, PulkoMandy now offers an option to do it in hardware - but still the software needs to avoid the situation if incompatible hardware is detected.

With the new extension one can at least be sure that there is no longer a risk of doing harm to your computer, because someone forgot to handle it.

OffseT

#27
Old memory expansions not being totally compatible with Amstrad Plus is an issue known for ages. When plugged on a Plus, they prevent most 128K softwares using ASIC from working (especially demos). It is obviously not the fault of the software coders since their software works just fine with the internal 64K expansion memory (which is not flawed, because Amstrad did it with ASIC in mind).

About patching the softwares or asking for developers to take care about unadapted expansion memory (in the way these expansions were designed for CPC, not for Plus), you should keep in mind that under some circumstances, it is just not even possible, especially when dealing with 64K paged mode (&C2); and like explained previously, in any case it is at cost of complexity and bigger/slower code (notably when dealing with interrupts and asynchronous stuff). So no, it has not to be handled in a mandatory way, it just might be (kindly) handled if possible without adding too much code/complexity.

As a conclusion, all Plus owners willing to expand memory should now use this new Gemini board instead of old ones designed without ASIC in mind (such as dk'tronics, Symbiface II or whatever).

TotO

@PulkoMandy It is not because you handle RMR2 (or a trick you have found) than others are misbehaving memory expansions. First because some was designed before the Plus. Second, because some others already support it or offer an alternative hardware way to be compatible. Again, it is not a problem that you are offering your RAM board. I'm pointing the fact that programmers making new softwares requiring the ASIC paging can do a minimum to be compatible with hundred of expansions already owned by users instead of ignoring them.

@eto Using a CPC memory expansion on a Plus do not damage anything. At worst, with some new programs using the ASIC paging like on a stock machine and not taking care about the existing hardware, the solftware can have bugs and may require to be disabled.

@OffseT I agree, Plus users requiring a memory expansion are welcome to use the Gemini board. And programmers are welcome to support the existing hardware instead of discarding them intentionaly, when there is no drawback at all. (SoundTracker DMA with the X-MEM for example)

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

OffseT

Quote from: TotO on 12:17, 11 October 22@OffseT I agree, Plus users requiring a memory expansion are welcome to use the Gemini board. And programmers are welcome to support the existing hardware instead of discarding them intentionaly, when there is no drawback at all. (SoundTracker DMA with the X-MEM for example)
Well, there was no intention to discard X-Mem at all. At start, the Soundtracker DMA just checks that the memory has the expected behavior and refuses to execute if it is not the case. Not doing this test would have made the user think that it works whilst silently and randomly trashing memory in background, making the music auto-destroying itself while playing... it was much better to block program start. :) 

About making Soundtracker DMA to work with CPC memory expansion used on Plus, typically, it was considered. But it was too memory hungry and CPU intensive, notably because it added management during interrupts (which are tricky when dealing with DMA). Since no memory expansion was required (Soundtracker DMA works on a stock 6128plus), it was a better option to ask the user to remove the incompatible memory card. It has nothing to do with X-Mem, really, the same issue applies with dk'tronics (which is actually the one we have) and all other old memory expansions.

eto

Quote from: OffseT on 12:03, 11 October 22old memory expansions not being totally compatible with Amstrad Plus is an issue known for ages.
I would say that it is known, but just to a small group of experts and enthusiasts, not to the wide public. And it's not even easy to find it, if you don't know what and where to look for. 

I'm following most discussions and stuff around the CPC/Plus for 2.5 years now and I was not aware of it. It's not on any page I have ever seen about the Plus. It's not on any Wiki page about any of the RAM extensions. Revaldinhos extensions are documented to be Plus compatible - and those people that build and sell it, put exactly that in the offer description. 

If somebody could point me to forum thread or any other page that documents this properly, I would update the WIKI pages about RAM extensions and the Plus, so that at least we limit the moment of surprise to anyone, who was not closely following this forum for the last 10 years.

Quote from: TotO on 12:17, 11 October 22Using a CPC memory expansion on a Plus do not damage anything.

Pulkomandy pointed out, that there is a chance of damaging the hardware, if the code would access paged RAM for too long as ASIC and RAM would put their data on the bus. Even if that would only happen in rare cases (like bugs), it should not be ignored.

Even if there is no risk of hardware damage, software should deal with it as RAM extensions are widely used. I would not request any developer to "support" incompatible RAM, but at least, like (I think) Soundtracker DMA and CRTC3 are doing it, they should output a warning or stop execution if incompatible RAM is detected.


TotO

Quote from: OffseT on 12:55, 11 October 22Well, there was no intention to discard X-Mem at all. At start, the Soundtracker DMA just checks that the memory has the expected behavior and refuses to execute if it is not the case.
Before the check was added, SoundTracker DMA worked with a RAM board. If the test is removed, it works again. Anyway the X-MEM offers a known compatibility mode for Plus that is not used by SoundTracker DMA but works great on Sonic GX or Ghosts'N Goblins (128K version) since years.

Quote from: etoEven if there is no risk of hardware damage, software should deal with it as RAM extensions are widely used. I would not request any developer to "support" incompatible RAM, but at least, like (I think) Soundtracker DMA and CRTC3 are doing it, they should output a warning or stop execution if incompatible RAM is detected.
I can understand that a message is displayed when the incompatibility is real and no way to deal with an existing memory expansion plugged. :)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

PulkoMandy

Do you have documentation for what your compatibility mode is and how it works?

In the case of Gemini it is transparent: it reproduces the ASIC unlock sequence and the RMR2 register, so it knows when the ASIC is mapped. So it behaves just like the internal RAM.



OffseT

Quote from: TotO on 14:00, 11 October 22Before the check was added, SoundTracker DMA worked with a RAM board. If the test is removed, it works again.
Your statement is wrong. Like I just explained, it looks like it works but it does not since there is random memory trash while playing sounds. The incompatibility is real and the test is there for a reason, it avoids data loss.

Quote from: TotO on 14:00, 11 October 22Anyway the X-MEM offers a known compatibility mode for Plus that is not used by SoundTracker DMA but works great on Sonic GX or Ghosts'N Goblins (128K version) since years.
I guess you talk about using &7Exx port instead of &7Fxx? Since this port is also used by 1MB+ memory expansions, I think this trick was not considered robust enough (or at least it would have required additional memory checking code to figure out). Anyway, both Soundtracker DMA and CRTC³ won't require more than the stock 128KB, and they do not crash when an incompatible memory expansion is plugged, which is better than crashing like most does. :)

TotO

Quote from: PulkoMandy on 14:33, 11 October 22Do you have documentation for what your compatibility mode is and how it works?

In the case of Gemini it is transparent: it reproduces the ASIC unlock sequence and the RMR2 register, so it knows when the ASIC is mapped. So it behaves just like the internal RAM.
Sure, I'm decoding RMR2 too into the X-MEM+ but not into the X-MEM because no enough CPLD room to fit that. Instead, I have decoded A8 to allow to continue to access the internal 64K RAM memory on CPC and Plus by disabling the external memory through the &7Exx port. So, it is a compatibility mode for the CPC 128K with this expansion since 10 years ago. It is not because this port can be used for extra 512K that is not possible to use it for extra 64K. ;)

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

zhulien

#35
I was just asking what the issue was as I had not yet come across it - but I'm not using DMA on the plus.  I guess the easiest fix is to fix the programming documentation, but of course making new hardware is good and fixing software is possible most of the time.

For me, I like my software to support as much hardware as possible when possible - not target specific ones.  I guess I could make my software check if on a plus with a memory expansion that conflicts with ASIC in some circumstances and stop it from running, but I'd rather make my software work unless I couldn't make it work.

Prodatron

Quote from: eto on 13:11, 11 October 22I'm following most discussions and stuff around the CPC/Plus for 2.5 years now and I was not aware of it. It's not on any page I have ever seen about the Plus. It's not on any Wiki page about any of the RAM extensions.
TBH I didn't know about the ASIC/memory expansion issue for many years as well. So when I tested my stuff on a real CPC Plus with SYMBiFACE II attached back in 2006, I got frustrated and deactivated Plus support in SymbOS.

Only a few years ago I read about it here in the forum, and now of course it totally makes sense, that it is not a good idea to map in the ASIC and extended memory at the same time for standard expansions, which have no idea about the ASIC.
I am looking forward to the Gemini, but I will also try to fix this in SymbOS, so that it should run on a Plus even with old memory expansions.

You are right, we should add some infos to the Wiki :)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

zhulien

Is there a wiki page on the issue and how to reproduce it in software and perhaps ways to avoid it in software?

and... does the issue also exist between eg: multiface 2 and 6128plus, or multiface 2 and DkTronics?  and Vidi?

PulkoMandy

Originally I had planned for a 2MB RAM on this card, but it is out of stock now.

That would have complicated usage of port 7Exx. Already with a 1MB card it complicates things a bit, since the Gemini uses 7Exx and 7Fxx for its own RAM.

And if I decide to do a 4MB version later, there would not be any space left in the IO ports unless I do a trick to let the CPC handle the first 64K or something like that. And it creates a difference of behavior between the different banks still, which I find confusing.

Isn't it the same with the Y-MEM or another one of your expansions? (I'm sorry, I must say I'm a bit confused by so much hardware bing available :D but I think you had a way to have the XMEM behave as a second 512K bank aside the first one?)

TotO

Quote from: PulkoMandy on 15:27, 11 October 22Isn't it the same with the Y-MEM or another one of your expansions? (I'm sorry, I must say I'm a bit confused by so much hardware bing available :D but I think you had a way to have the XMEM behave as a second 512K bank aside the first one?)
Sure, you are right. Decoding A8 allows to connect a second "X-MEM" (named Y-MEM), but it is not official and I have built them only to peoples asking for 1MB with SymbOS or custom programs for CPC (Chany). Using it will disable the internal 64K RAM expansion and no more compatible with Amstrad Plus.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Prodatron

Quote from: PulkoMandy on 15:27, 11 October 22Originally I had planned for a 2MB RAM on this card, but it is out of stock now.
1MB is enough for anyone.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

HAL6128

Quote from: Prodatron on 15:23, 11 October 22
Quote from: eto on 13:11, 11 October 22I'm following most discussions and stuff around the CPC/Plus for 2.5 years now and I was not aware of it. It's not on any page I have ever seen about the Plus. It's not on any Wiki page about any of the RAM extensions.
...
I am looking forward to the Gemini, but I will also try to fix this in SymbOS, so that it should run on a Plus even with old memory expansions.
Does it mean that you are going to produce a special SymbOS for the Plus range?? (hardware mouse pointer... just kidding)   ;D
Seriously, would it make sense or an improvement to use the plus capabilities for SymbOS?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

roudoudou

Quote from: TotO on 19:20, 10 October 22Very strange point of view for a hardware guy to think the way is to fix the hardware than to patch a software. In fact, you fix nothing but asking peoples to buy a new hardware because a programmer do not want to make a software compatible with the existing hardwares already owned by hundreds people. Worst, when a way to make it working properly exist, but instead of testing to support it, it is tested to make it not supported.
i make an adaptation for  Asic Intro 2 with software (basically disabling Asic before RAM banking)
but you cannot adapt a programm using C2 mode (64K video + code in upper RAM)
My pronouns are RASM and ACE

andycadley

Quote from: roudoudou on 21:01, 11 October 22
Quote from: TotO on 19:20, 10 October 22Very strange point of view for a hardware guy to think the way is to fix the hardware than to patch a software. In fact, you fix nothing but asking peoples to buy a new hardware because a programmer do not want to make a software compatible with the existing hardwares already owned by hundreds people. Worst, when a way to make it working properly exist, but instead of testing to support it, it is tested to make it not supported.
i make an adaptation for  Asic Intro 2 with software (basically disabling Asic before RAM banking)
but you cannot adapt a programm using C2 mode (64K video + code in upper RAM)

Yeah, that was the problem I found when I first heard about it. I was using the C1 and C2 configurations (with page 3 reserved for samples I never needed paged in), which works fine on a 6128+, but couldn't easily restructure things to work any other way because I couldn't have multiple banks paged in that way. It's not necessarily as simple as just "don't do it" unless you're targeting cartridge software.

Fundamentally it's because most memory expansions aren't Plus compatible. Just like the Multiface isn't Plus compatible. Is it really a bad thing if anyone actually does make a compatible solution? Do we really need to complain and argue over it?

Prodatron

#44
Quote from: HAL6128 on 20:21, 11 October 22Does it mean that you are going to produce a special SymbOS for the Plus range?? (hardware mouse pointer... just kidding)  ;D
Seriously, would it make sense or an improvement to use the plus capabilities for SymbOS?
Haha, yes, all SymbOS versions <1.0 supported the Plus :D at least regarding the palette (12 bit = 4096 colour based).
Then we had this problem with asic+symbiface II and I deactivated it (as I didn't know about this in 2006).
CPC Plus version would at least support the 4096 colour palette and the hardware mouse pointer (which will make sense for a new game).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Cwiiis

Quote from: Prodatron on 23:57, 11 October 22
Quote from: HAL6128 on 20:21, 11 October 22Does it mean that you are going to produce a special SymbOS for the Plus range?? (hardware mouse pointer... just kidding)  ;D
Seriously, would it make sense or an improvement to use the plus capabilities for SymbOS?
Haha, yes, all SymbOS versions <1.0 supported the Plus :D at least regarding the palette (12 bit = 4096 colour based).
Then we had this problem with asic+symbiface II and I deactivated it (as I didn't know about this in 2006).
CPC Plus version would at least support the 4096 colour palette and the hardware mouse pointer (which will make sense for a new game).
I for one am looking forward to this new version of SymbOS 🙂

I'm still interested in the expansion board of course, but out of interest, would it be feasible to implement this as a board that sits in-between the CPU and its socket for an internal 1MB upgrade? That would be very neat, and extremely convenient for development...

PulkoMandy

I don't think it's possible with the exact same design and just the CPU socket, since a few extra signals from the expansion port are used (mainly RAMDIS to disable access to the internal RAM). With a few extra wires soldered it may be possible.

The schematics and Kicad file are available if someone wants to try designing a CPU socketed board. It may even be possible to reuse internal signals from the ASIC instead of replicating the lock/unlock logic then?

Another option is soldering an internal cable to the expansion port, and fitting your expansions inside the Amstrad Plus case (there is a lot of space besides the motherboard). I think OffseT did this with several expansions (Albireo, FlashGordon, and maybe Nova?).

TotO

Quote from: Prodatron on 23:57, 11 October 22Plus version would at least support the 4096 colour palette and the hardware mouse pointer (which will make sense for a new game).
I though about that yesterday evening. 1 mouse pointer and 15 desktop icons. ;D
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

zhulien


I have a plus version of the multiface 2, but i am unsure what is done to it to make it work other than the form factor (now an mx4 card).

zhulien

interesting from the Chibi Akuma's technical page

https://www.chibiakumas.com/z80/platform3.php#LessonP24

QuoteTurn on the CPC Plus:

We've covered it before, but remember, by default The CPC+ features are disabled, leaving us with only a regular CPC... to use the PLUS features, we need to send a series of 17 bytes to the CRTC at port &BCxx

Once the CPC+ features are on, a special bank of 16k 'ASIC' memory will become available, which we can write to between &4000-&7FFF in the same way as our normal memory.

To Turn it on we use:
    ld bc,&7fb8
    out (c),c
To turn it off we use:
    ld bc,&7fa0
    out (c),c

NOTE: When using the ASIC memory, We should make sure that we're using the 128k banks are disabled, or it can cause problems with some 128k ram upgrades. Mode C1/C3 are OK to use as they  page in at &C000


Powered by SMFPacks Menu Editor Mod