News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Bryce

MegaFlash Released!

Started by Bryce, 18:09, 21 July 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TFM

Quote from: Bryce on 21:54, 23 July 11
@TFM, maybe when you've finished all the software you could release some standard assembly routines for saving to the MegaFlash, that other people could implement in their software to add MegaFlash functionality? Or would that be a lot of work?

Bryce.

Well, you mean just a programming example? What's about a short, easy to undertand and well documented source? Would that work?

In which way should it be released? Source Code at the Wiki?

My apologies, I know it's no good manners to answer a question with a couple of them  8)  I'm going to create something usable in my Z80 kitchen quiete soon during this weekend.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

steve

Could a short BASIC program do the job?, it might only be used once so there does not seem a need to keep it in the megaflash.

MacDeath

#27
QuoteMegaFlash with 512K Flash (32 ROMs): €75
Centronics Cable: €7
Edge Connector Cable: €10
Postage: €5
I sadly see no ACID emulation here... :(


...But I heard there were some good apps in ROM on CPC...  ;)



OCT

#28
Quote from: MacDeath on 04:08, 24 July 11
I sadly see no ACID emulation here... :(
Unsurprisingly, since this creation lives on the Expansion Port and talks to the CPU, rather than in the cartridge bay where it could find the CCLR & SIN lines to unlock the ASIC.
However there was a fairly easy "hardware exploit" to emulate the ACID with some simple logic gate IC in the threads around here, the one disadvantage over a CPLD (devised in the "full clone" hack) being IIRC that it would only work on repeated resets some of the time:

http://www.cpcwiki.eu/index.php/File:NoAcid_sch.png from http://www.cpcwiki.eu/index.php/ACID#Clones.

OCT

#29
BTW, unlike a "less uncommon" 74HC112N which could be sourced at least in packs of 10 from http://de.rs-online.com/web/p/products/6631893, according to Nilquader in http://www.cpcwiki.eu/forum/index.php?topic=410.msg22291#msg22291 (where we should probably move/continue that fork of this thread) this flip-flop absolutely, regrettably has to be a 74AC112N, unbeknownst even to RS Components (of last resort when the likes of Conrad, Maplin and Reichelt-to-the-rescue don't stock some obscure part).

Bryce

#30
Very interesting stuff. I hadn't seen that before. I'll build one when I have time and see if I can improve it so that it doesn't need all those resets :) That would be a very useful circuit.

On the technical side, yes the AC version isn't that easy to find. The AC is the Advanced Schottky CMOS version. The F type is probably the closest to this, but as stated above probably wouldn't work (ie: would need even more resets).

Bryce.

OCT

#31
My understanding was that the repeated reset would be required on any kind of flip-flop, for the simple reason that by coincidence it had to start on the right (same-as-CPC/ASIC) logic state - statistically 50% of the time.
Maybe some more gate logic could be added to make sure that happens on every reset, but then again the CPLD (guaranteed to get it right every time) could become the "smaller" solution in terms of pin count and soldering effort.
Either way, "intercepting" CCLR+SIN before the cartridge connector would be another way (in addition to your MITM device) to open up the Plus&GX4000 for every homebrew cartridge we can think of (and I see how this might just trigger the idea of making a MegaCart too in your mind :) - with or without an emulated on-board ACID, albeit possibly PC-programmable since writing it from the CPC might become quite hard - the holy grail of course being a Bluetooth stack to remotely rewrite the cartridge, if need be even "with an App for that" ;)).

SyX

Quote from: TFM/FS on 22:53, 23 July 11Well, you mean just a programming example? What's about a short, easy to undertand and well documented source? Would that work?
Perfectly, it would work perfectly  ;)

Quote from: TFM/FS on 22:53, 23 July 11In which way should it be released? Source Code at the Wiki?
I think that it's the more sensible option,  the Wiki is the "CPC Encyclopedia"   :)

TFM

#33
Quote from: TFM/FS on 22:53, 23 July 11
I'm going to create something usable in my Z80 kitchen quiete soon during this weekend.

OMG! I met Amanda and Erin yesterday, they brought me to the French Quarter, I returned home at 6:30 (a.m.!). However, promises are made to be held ;-) Btw: The Source is for the Maxam assembler.

So here is a link to the source. If you have any questions don't hesitate to ask me.

http://www.cpcwiki.eu/index.php/File:Flash.dsk

Have a great week!

Quote from: steve on 02:43, 24 July 11
Could a short BASIC program do the job?, it might only be used once so there does not seem a need to keep it in the megaflash.

No, to program a Flash is something that must be performed in a special time frame / time schedule. Interrupts would screw all the timings up. You would just crash the system.
It's not as easy as to program a ROM-RAM-Box, RAMCARD or SYMBiFACE II, because they use S-RAM. And S-RAM has in particular big disadvantages!

However, it's also needed to activate the ROM with the right ROM number and the upper ROM must be switched on. You just can't do that in BASIC, even if you would block the interrupts (C9 at 38, + L-RAM).

Quote from: MacDeath on 04:08, 24 July 11
I sadly see no ACID emulation here... :(
The MegaFlash is an ROM expansion for all the CPCs. Only few use a CPC Plus. So why should all the users of the normal CPCs be bothered with an (for them) useless ACID emulation. Just use the Man-in-the-Middle solution from Bryce!  ;) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Hi all,
    just wanted to let you know that all edge connectors have now been sold. I mentioned earlier that I only had 10 of them and that when there gone there gone. So anyone else ordering from now on can only have Centronics or no cable. If anyone has a source for more 50way IDC edge connectors I'd like to hear from them. The part No. for these connectors is usually EC50-254.

Thanks,
Bryce.


Bryce

#36
 :) It is, I must speak with Eliot :) In that case, ignore my last post, you can still order the edge connector version.

Bryce.

qbert

By the way, is it possible to build a unique carry-through cable using that rare connector on one side and then cross a potential infinite number of centronics connections on the main cable section or am I missing something ?
Each extension will then connect on the main cable using a "simple" female-centronics to pcb adaptor.
In case I'm right, it seems each CPC-old-non-schneider user in the world only need one of those rare connectors for every extensions he has or will ever have...
Am I wrong ?


Quote from: Bryce on 08:07, 25 July 11

Hi all,
    just wanted to let you know that all edge connectors have now been sold. I mentioned earlier that I only had 10 of them and that when there gone there gone. So anyone else ordering from now on can only have Centronics or no cable. If anyone has a source for more 50way IDC edge connectors I'd like to hear from them. The part No. for these connectors is usually EC50-254.

Thanks,
Bryce.

Bryce

That's exactly why I use a header connector on the PCB. The 50way edge connector (the rare one) is a seperate cable, that you could use for other devices that had such a header. As well as that, by swapping the cables, one MegaFlash can be used on all types of CPC if you happen to own both types.
But it couldn't be infinite, probably about 5 devices would be the limit, due to current restrictions. And the physical length should be kept to a minimum too, otherwise each wire works as an antenna and picks up way too much noise from the monitor etc.

Bryce.

TFM

Let me remember... Once I had the following stuff at the same time at the Exp.-Port connector (some in parallel, some in chain) and it worked:

- ROM-RAM-Box
- 512 KB S-RAM (battery buffered)
- Dobbertin Hard-disc controller
- CPC-Booster
- Lightpen
- Vortex Controller (F1-D)

My monster-CPC currently has at the Exp. Port:
- EPROM card      /
- RAM card        / all Dobberting
- HD controller / --> has bus buffering
- small PCB creating Reset

It all runs well. But more would be maybe too much.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Yup, I would guess that you were very close to the limit there, although the expansions don't all pull lots of current at the same time, the 5V regulator in the Monitor was still probably pretty warm.

Bryce.

TFM

Right, guess it depends mostly on the type of the ICs (N-MOS, C-MOS or something modern ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Modern devices still are CMOS. The Flash IC on the MegaFlash is CMOS, but all the other ICs are 74 Series (TTL) which have also been around since long before the CPC.

Bryce.

Bryce

#43
Hi all,
       Last night I tested the actual current the MegaFlash is pulling from the CPC. According to the Datasheets, the theoretical absolute peak current should be 129mA (by adding the peak current value of each component). However, this never occurs, because at no point do all ICs pull their peak current at exactly the same time. In fact the highest measured peak I could get is when writing to the Flash, where I measured peaks of 68mA, reading the Flash required 42mA and in standby (ie: neither reading nor writing) the current was a measly 28mA. Considering that the expansion port can supply around 500mA, the MegaFlash can definitely be used with several other devices attached at the same time. Also remember, that the DDI-1 doesn't really require any current from the CPC, it actually gets most of it's current from the FD-1.

Bryce.

SyX

#44
Wonderful News Bryce!!!  :)

I hope that new expansions will use the MegaFlash for the program rom, enabling simpler and cheaper designs :) ... even more ambitous ;)

Quote from: TFM/FS on 00:06, 25 July 11
OMG! I met Amanda and Erin yesterday, they brought me to the French Quarter, I returned home at 6:30 (a.m.!). However, promises are made to be held ;-) Btw: The Source is for the Maxam assembler.

So here is a link to the source. If you have any questions don't hesitate to ask me.

http://www.cpcwiki.eu/index.php/File:Flash.dsk
Thanks TFM!!!  :)

I have converted the sources to the assembler that i use, the code is very easy to understand and the process is very straightforward(select the rom number, make visible in the upper rom position and copy the new rom there).

My only doubts are about the delay to write/erase bytes (32 ms to write 256 bytes) and the length in bytes of the data blocks to write in the flash (it looks that is 256 bytes). Although you have commented both in the sources, i know that i must read the datasheet to understand them, but something that you can say, it would be very helpful  ;)

Bryce

Just to clarify the timing: When you write data to the W29C040 it is first written to a buffer which can hold 256bytes and then transferred to the Flash memory. When you start writing the bytes, you may not have a pause of more than 150µS between bytes. Otherwise the W29C040 thinks there's no more data coming. When this happens or the 256bytes of buffer are full, the Flash starts writing this data from the buffer to the Flash. This takes around 5ms, but may take up to 10ms. For that reason, after sending the 256bytes you will have to add a delay loop before you start sending the next 256byte.

Bryce.

TFM

#46
Quote from: SyX on 12:34, 27 July 11
Wonderful News Bryce!!!  :)

I hope that new expansions will use the MegaFlash for the program rom, enabling simpler and cheaper designs :) ... even more ambitous ;)
Thanks TFM!!!  :)

I have converted the sources to the assembler that i use, the code is very easy to understand and the process is very straightforward(select the rom number, make visible in the upper rom position and copy the new rom there).

My only doubts are about the delay to write/erase bytes (32 ms to write 256 bytes) and the length in bytes of the data blocks to write in the flash (it looks that is 256 bytes). Although you have commented both in the sources, i know that i must read the datasheet to understand them, but something that you can say, it would be very helpful  ;)

Hi SyX (cool Pseudo btw...)

Yes, right, the Flash gets programmed in pages of 256 bytes. This happens the following way:

- A buffer page of 256 Bytes is filled with bytes. (They must not be ordered). As soon as you write the first byte, this process starts. But all the written bytes of a page don't go directly to the Flash, they go to a buffer first. This 256 bytes buffer holds the bytes, as long as the writing continues.

- Now, you have to wait several ms. If you have been waiting long enought, then the Flash erases a 256 bytes page in the Flash. And then the 256 bytes buffer get's written to the Flash-Memory.
(The waiting time is a sign for the Flash, that the buffer is filled up completly).

Hmmm... I hope to have been able to explain this ... well, if I wasn't clear enough... just ask  :)


EDIT: Oh, I see, Bryce already explained it. But I want to mention another point. It may be possible that different producers of the Flash have slightly different timings. So it's good to have some 'space' to be able to work with all Flash types.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

SyX

Thank you very much to both, you are always very helpful  :)

Quote from: TFM/FS on 16:47, 27 July 11EDIT: Oh, I see, Bryce already explained it. But I want to mention another point. It may be possible that different producers of the Flash have slightly different timings. So it's good to have some 'space' to be able to work with all Flash types.
Totally agreed, that it's a good practice  :)




Quote from: TFM/FS on 16:47, 27 July 11Hi SyX (cool Pseudo btw...)
i heard that all cool pseudos use three letters  ;D

Bryce

There are a few other manufacturers, but there's no standard, that means that some use different timing, but some have page sizes and some can't permanently disable the software write-protection, so they wouldn't work at all on the MegaFlash (at the moment). So generally if you are going to replace the Flash, it should really be a W29C040 from Winbond.

Bryce.

TFM

Quote from: Bryce on 18:14, 27 July 11
There are a few other manufacturers, but there's no standard, that means that some use different timing, but some have page sizes and some can't permanently disable the software write-protection, so they wouldn't work at all on the MegaFlash (at the moment). So generally if you are going to replace the Flash, it should really be a W29C040 from Winbond.

Bryce.

So let's hope that micro$oft will not buy Winbond, else these Flash chips will get really slow ;-)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Powered by SMFPacks Menu Editor Mod