News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Dk'tronics ram, c3 selection, 464

Started by arnoldemu, 17:06, 23 October 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

I can't find the original post.

But, the dk'tronics documentation mentions a difference with selection c3 compared to a external ram expansion (and a 464), and the 6128's internal ram expansion.

On a 6128:

When c3 is selected, page 3 (normally at &c000-&ffff) is now readable at &4000-&7fff. page 7 appears at &c000-&ffff.
If the upper rom is enabled, it appears at &c000-&ffff as expected.

464 (costdown) + dk'tronics 64k:

c3 works fine if no roms are enabled. It has the same setup as on the 6128.

If upper rom is enabled however, the upper rom is now readable in the range &4000-&7ffff. page 7 appears as expected at &c000-&ffff.

I don't think this is down to the 464 (I used a costdown you see), I think it's down to the expansion being external and the way it maps the pages.

Will try the test another day on a 664 an older 464 and if I can use an adaptor on a 6128 (just to see if it takes priority over the internal expansion... and what the result actually is ;) ).

So some of the information has been tested.



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

Only the 6128 moves the screen RAM from &C000 to &4000 (when using &C3).

Use FutureOS on a 464/664 or a 6128, move the mouse arrow and you see the difference ;-)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TFM/FS on 05:10, 24 October 11
Only the 6128 moves the screen RAM from &C000 to &4000 (when using &C3).

Use FutureOS on a 464/664 or a 6128, move the mouse arrow and you see the difference ;-)
My test showed different, it does move it, but only if ram is disabled.

This morning I tried to test the dk'tronics on my 664, but I think the contacts need cleaning. it didn't work.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

Quote from: arnoldemu on 09:05, 24 October 11
My test showed different, it does move it, but only if ram is disabled.

Which system have you been using? (CPC type, expansion RAM)?

Quote from: arnoldemu on 09:05, 24 October 11
This morning I tried to test the dk'tronics on my 664, but I think the contacts need cleaning. it didn't work.

Cleaning or it doesn't work??


I made my own tests long ago, and my results are in agreement with publications, so I would wonder if &C3 will work on a 464 or 664 properly. But let me know if I'm wrong  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

#4
Quote from: TFM/FS on 22:18, 24 October 11

Which system have you been using? (CPC type, expansion RAM)?
 
CPC464, costdown crtc/ga.
dk'tronics 64k expansion.

I also tried english cpc664.

Quote from: TFM/FS on 22:18, 24 October 11
Cleaning or it doesn't work??
I tried it again on the cpc664, it reports as if no extra ram is connected, the ram does nothing with my 664. I will try and clean the contacts better next time.


Quote from: TFM/FS on 22:18, 24 October 11
I made my own tests long ago, and my results are in agreement with publications, so I would wonder if &C3 will work on a 464 or 664 properly. But let me know if I'm wrong  :)
Well dk'tronics manual says that &C3 is special on 464. Because upper ROM data will show at &4000-&7fff if it is enabled.
I can't speak for Dobbertin - It may be much better and always work correctly.
My results are only for 64k dk'tronics ram designed for 464.

Just now I connected the dk'tronics expansion to a CPC6128. I removed part of the ram expansion case, because it is designed for the 464, and I also removed the disc drive power cable from the cpc. I could then connect the ram to the 6128. I have been loading my test programs like cassettes (play the sound on the pc - loaded into audacity on  linux), |TAPE:RUN" on cpc and wait for program to run.

So I found interesting results. Of course I had "rampack wobble", which means the connections are not that great. I tried different number of books and pieces of paper to try and find the correct adjustment (to support the ram).

One test showed results like normal CPC6128, perhaps expansion was not working here.

Second test showed a strange result, giving errors for all ram configurations (c0-c7) and showed data I did not program in my test (I write 1,2,3,4 etc in each page, report was giving back &12, &13, &14 etc??).

The third one showed a more reasonable result and more closer to what I saw on the 464.

In the final result, the dk'tronics had priority over cpc6128 2nd bank of 64k. &c3 was the only configuration to show strange results here.
If rom is disabled, &c3 shows showed page 8 repeated at both &4000-&7fff and &c000-&ffff.
If rom is enabled, &c3 shows rom at &4000-&7fff and page 8 at &c000-&ffff.

So the test, if reliable shows:
1. external ram takes priority over internal ram.
2. configuration &c3 becomes broken if you use 64k dk'tronics ram on 6128. So - don't connect it up to a CPC6128. You don't need to anyway, but don't do it ;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

#5
That cost-down GA may contain some 6128 functionality, since the 6128 has a PAL for RAM managing, maybe this is part of the cost-down GA (what wóuld make sense). Such a cost-down-464-GA could work like a 6128, one possible explanation.

I don't believe the dk'tronics manual. An external expansion can't influence ROM banking INSIDE the CPC, but maybe I miss the point here.


Quote from: arnoldemu on 21:06, 25 October 11
In the final result, the dk'tronics had priority over cpc6128 2nd bank of 64k. &c3 was the only configuration to show strange results here.
If rom is disabled, &c3 shows showed page 8 repeated at both &4000-&7fff and &c000-&ffff.
If rom is enabled, &c3 shows rom at &4000-&7fff and page 8 at &c000-&ffff.

So the test, if reliable shows:
1. external ram takes priority over internal ram.
2. configuration &c3 becomes broken if you use 64k dk'tronics ram on 6128. So - don't connect it up to a CPC6128. You don't need to anyway, but don't do it ;)

1. That's 100% right!
2. I'm not sure about this. I will test this later on, just for curiosity  ;) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TFM/FS on 22:44, 25 October 11
That cost-down GA may contain some 6128 functionality, since the 6128 has a PAL for RAM managing, maybe this is part of the cost-down GA (what wóuld make sense). Such a cost-down-464-GA could work like a 6128, one possible explanation.
It is possible. If I do not connec the 64k dk'tronics ram, the cost-down 464, reports the same as a normal 464. The result is no extra ram. It doesn't show any other values for &c4, &c5, &c6, it is identical to normal 464. It seems the PAL inside it is disabled for the cost down 464.

I will also check again on my other 464, a 464 with a 40007 ga, this may not be so reliable, I also have a vortex 512k ram inside this one...
so really I need somebody else to verify my findings.

Quote from: TFM/FS on 22:44, 25 October 11
I don't believe the dk'tronics manual. An external expansion can't influence ROM banking INSIDE the CPC, but maybe I miss the point here.
I do. In this configuration (&c3), the A15/A14 address lines are probably swapped  to make the configuration we want so ram that was normally  at &c000-&ffff now is at &4000-&7fff.
Perhaps it swaps the address lines *ALL* the time, so that ROM is also then read from this location, it is effectively re-mapping the ROM's location.
The Z80 then sees it in it's final location.

The address lines and data lines flow through the computer and through expansions, so if they did their operation before the z80 read the result... well you can do as you want?


 
Quote from: TFM/FS on 22:44, 25 October 11
1. That's 100% right!
2. I'm not sure about this. I will test this later on, just for curiosity  ;) :)
Great, please try that.

I would also be interested to know:
1. is dobbertin ram the same, or is it better?
Is there some pictures of it on the wiki - especially the pcbs? Does it have a PAL in it, and if it is, is it an Amstrad one?

2. if I connected a silicon disk, or 256k ram expansion to the cpc6128. I enabled the roms, and chose one of it's "&c3" configurations (not sure what it would be &cd???). Would this show the same memory result as I got for the 64k ram on the 6128? I think the result depends on the internal PAL within the 64k expansion and it's internal functions.

I see that my  64k dk'tronics ram has a PAL inside it and it's not the AMSTRAD one ;)

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

There's no way of knowing whats in the PAL, but I doubt it's similar to the internal Amstrad one, because it performs a slightly different function. A14 and A15 may be decoded differently, but they are not physically swapped, the pinout of the rear edge connector is correct, otherwise the MegaFlash wouldn't work properly, and it works fine when plugged "behind" a DKTronics RAM expansion.

I also don't think that the banking part of the 464+ ASIC is disabled, otherwise you would need to re-enable it to convert a 464+ to a 6128+, which you don't. It's just not connected to any RAM.

Bryce.

Ygdrazil

The Dobbertin memory expansions

http://cpcwiki.eu/index.php/Dobbertin_Memory_Expansion

Generally i really liked Dobbertin expansions, which was of a very high quality!

/Ygdrazil

Quote from: arnoldemu on 08:12, 26 October 11

I would also be interested to know:
1. is dobbertin ram the same, or is it better?
Is there some pictures of it on the wiki - especially the pcbs? Does it have a PAL in it, and if it is, is it an Amstrad one?



arnoldemu

Quote from: Bryce on 08:43, 26 October 11
There's no way of knowing whats in the PAL, but I doubt it's similar to the internal Amstrad one, because it performs a slightly different function. A14 and A15 may be decoded differently, but they are not physically swapped, the pinout of the rear edge connector is correct, otherwise the MegaFlash wouldn't work properly, and it works fine when plugged "behind" a DKTronics RAM expansion.

I also don't think that the banking part of the 464+ ASIC is disabled, otherwise you would need to re-enable it to convert a 464+ to a 6128+, which you don't. It's just not connected to any RAM.

Bryce.
Well if it wasn't disabled, what would happen for c1 and c3 configurations. I should see something?
I don't see any difference compared to a standard 464.

I assume it would work fine with a megaflash, you would see a rom from the megaflash then visible at &4000 if enabled and configuration &c3 was used.

I will post up my test program later, and update it so it will look at the configurations for silicon disc etc. Perhaps others can tell me what they see when they try it with other ram expansions.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

No, the MegaFlash monitors A15 to know when a ROM is being initialised, so if the lines were swapped, it would be impossible to initialise a ROM.

Bryce.

arnoldemu

Quote from: Bryce on 14:13, 26 October 11
No, the MegaFlash monitors A15 to know when a ROM is being initialised, so if the lines were swapped, it would be impossible to initialise a ROM.

Bryce.
http://www.cpctech.org.uk/memtest.zip
sources and a binary are in here.

it runs through each configuration (excluding c2 for the moment), it then reports success or "got xx expected yy".
You can see which pages it should have in the source code. So when it says "got.." you can see which one failed and what the result was.

This is setup only for 64k ram. It doesn't check the whole ram, just checks the configs seem correct by poking a byte into each page.


if "has_ram" is 1, the results are as if ram was connected. if "has_ram" is 0, it expects to find the results as if no ram was connected.
"external ram" s 1, if you want it to check against 64k ram connected to 464, otherwise it assumes it's internal like 6128.

Eventually I will setup the test program to ask you what config you are testing, it then says "yes" or "no" to say if it is correct.

I have other tests like this, but they are not ready to be published yet.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

How can an external expansion swap internal signals (A14, 15) on the PCB??
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TFM/FS on 05:04, 27 October 11
How can an external expansion swap internal signals (A14, 15) on the PCB??
Ok, well it doesn't, but how can we explain how configuration C3 can work using external signals?

Think about reading only for now, I will do another check to confirm if writes go to the expected place.

A15-A0 will have the address the CPU wants to read.
D7-D0 will contain ROM data if ROM is active, or RAM data if ram is active.

Dk'tronics needs to assert /RAMDIS if it wants to *override* the internal ram with it's own.

The PAL must swap/change A15,A14 for configuration C3/C1 to make these configuration.

On 464, at least, or perhaps with 64k dk'tronics ram, the side effect is that rom becomes readable in the range &4000-&7fff for configuration c3.

For ROM to be readable, A15=1, A14=0, /RD=0, /IORQ=1.

PAL probably performs this remapping:
A15=1, A14=1 -> A15=0, A14=1 and
A15=0, A14=1 -> A15=1, A14=1 .

With /RAMDIS being asserted, data at &c000-&ffff, is now at &4000-&7fff. (ram/rom depending on what was on the bus).
D7-D0 doesn't change. A15-A0 doesn't change?????

I think the only way to solve this is to dump the PAL inside the dk'tronics RAM. Then we can see the tables and see how it handles the address lines etc.

For all other configurations I can easily see how it works. A15-A14 go through the PAL, converted into A15-A14 for the ram inside the dk'tronics. They do not go back to the bus. /RAMDIS is asserted when it's page takes priority. All is nice. But C3 configuration confuses me.

Forget the internal 64k RAM of the 6128, and forget it's PAL. This is wired different. This is connected directly to the RAM banks through /CAS0, /CAS1. It only ever controls what RAM data is made visible, and ROM overrides it correctly and doesn't move.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

Ah, now I understand what you mean. Yes, it could be possible that the PAL is doing that and it wouldn't effect a ROMboard during initialisation, but it might mess up the ROM during reading, because the ROMBoard is still independently reacting to the addresses on the non-swapped address bus. ie: RAM and ROM would both be enabled at &C000. Complicated, I will have to look at this in more detail when I have time.

Bryce.

TFM

If the Megaflash is written, then the written byte goes simultan to RAM and Flash :-)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Please look into it when you have time.

I updated my test, writing to RAM goes to the expected place.

if I set &c3 and I write to &5000. Now if I look through each page (main ram then extra ram), I see it is poked into the correct page. (so &d000 in &c0 selection).
And when I poke to &d000, it goes to page 8 (page that is read through &c7).

So the write is working correct too.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

Can you do a test? (No, don't feel bothered please... only if you like!). Well, check if the mouse-pointer of the futueros desktop can be moved over the screen normally. Or if it creates traces / tracks on screen. Test this with you special-464 with the 64 K RAM expansion. That would tell if C3 works like on an 6128 or not. :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

ralferoo

Sorry to dredge up an old topic, but I'm wondering how to emulate this behaviour too now!

As far as I can tell, a dk'tronics external RAM expansion on a 464 could only ever work in mode C3 if it's externally driving A15 high when A14=1, which seems like a recipe for a short circuit unless it's being shunted through a low enough value resistor that it can overpower the Z80, but I'd have thought it would still get pretty hot...

Theoretically, this could be possible as A15 and A14 are multiplexed on CASADDR' going into the internal DRAM, so it could monitor A14 during the RAS and assert A15 during the CAS. That would also explain why the ROM is appearing overlaid at &4000 when this shouldn't normally happen.

Does anyone have a schematic (real or reversed) of the dk'tronics board? I've never even seen one in real life, if I had one, I'd try to trace the circuit myself!

I was kind of expecting that C3 mode just wouldn't work on a 464 + dk'tronics expansion, but everything I've read seems to suggest it should and does. Yet, I cannot understand how it is possible UNLESS it is driving A15 externally...

ralferoo

Actually, digging into this more, looking at &#9733 AMSTRAD CPC &#9733 HARDWARE &#9733 PERIPHERIQUES AMSTRAD CPC &#9733 the following stood out:

Quote3. If code 3 is used, reads from &4000 to &7FFF, on CPC 464 and 664 machines, will only return the correct data if the upper ROM is disabled. This is at variance with CPC 6128 operation, but is unlikely to be a significant difference.

4.  If code 3 is used, addresses &4000 to &7FFF must not be used to run programs, they are intended for VDU or data access only.

So, that tallies with arnoldemu was seeing originally and also suggests that the are doing shenanigans like I suggested above. The reason I think that because after an instruction fetch, the data bus is sampled at the rising edge of T3 and for a normal memory access after it's extended by the gate array, it is sampled on the rising edge of T4. If the expansion pack is changing A15 at the rising edge of T3, the data bus from the ROM is also likely to be changing as it's read, which would lead to random instruction fetch errors but valid memory accesses....

But anyway, I think what I've learned is that mode C3 can be assumed to work as the 6128 for my emulation purposes...

IanS

It was discussed over in this other thread (link to post where gerald get his own ram expansion to work on a 464).

The Dk'tronics memory expansion on the 464 does drive A15 & MREQ to support C4-C7.

464 and ram extension ....


ralferoo

Ah, thanks to the pointer... I'd missed that thread entirely! And I feel a bit foolish for having spent about 4 hours trying to figure it out when the answer was right here all along!  :-[

Powered by SMFPacks Menu Editor Mod