News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Duke

Amstrad CPC WiFi

Started by Duke, 07:36, 07 May 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Duke

If there's really intest for something like this, I figure a ARM code upload function and execute would be the way to go.
Quote from: Duke on 20:44, 12 June 16
It's fully possible, but at this point only I can add commands to the cortex m4 side, but say you wanted some command to do a specific calculation I could add it.
Just give it to me in ARM assembler or C code :)

Maniac


Duke, you are a genius!


I've now tested the M4 with both the X-Mem with ROM support enabled and the C4CPC and all works as expected! Works like a dream!


In this config I can easily switch between the SD Card in the M4 and using ParaDOS with floppies/HxC using the |M4ROMOFF command. You just need to be careful with ROM slot numbers like this as they obviously clash but will need more time to work out the best config.


Thank you for sorting this out.


I'm afraid that the ROM slot bug for uploading ROM images still stands though but that's minor!

Quote from: Duke on 17:15, 12 June 16
@||C|-|E||

You have plenty of mass storage on that computer :)  and yes M4 will not work together with other dos roms currently.


Update v1.0.3 (beta maybe, I have not put it online for |upgrade yet, I would appreciate if someone other than me, tests it).

- Romboard part now supports 32 roms.
- You can set romboard start position. Ie. set it 32 and all roms starts from 32, ie. romslot 0 becomes 32, romslot 1 33 etc..
- M4Rom can be set to any rom in position 1-127 (effectively it's now a 33 rom slots )
- Possible fix for C4CPC and X-MEM.

Important before upgrading.
Delete your romconfig.bin and romslots.bin from M4 directory. Keep your config.txt though.

Download:
http://www.spinpoint.org/cpc/M4FIRM_v103.zip   (unpack both files to root of microSD, as both M4 and ESP needs to be upgraded).

When moving M4rom out of position 1-7 / 1-16 it will no longer be initialized, therefore I made a M4 bootrom, which should be placed at rom7 or lower.
This is if you want to use 32 roms of XMEM and map M4 romboard after it. You should program the XMEM or other romboard with M4 bootrom in pos 1-7, it will look for M4 rom from 1-127 and initialize it + pass commands through to it.
Download:
http://www.spinpoint.org/cpc/m4boot.zip

Bryce

Quote from: Duke on 21:09, 12 June 16
If there's really intest for something like this, I figure a ARM code upload function and execute would be the way to go.

I'd be very cautious about how you implement something like this. It would be too easy for the user to brick his device if it's not done properly.

Bryce.

Duke

#328
@Maniac
That's good news. Thanks a lot for running the tests.
- And yes I haven't looked at the chrome issue yet, so please all use firefox or whatever else for now :)

@Bryce
Good point, I didn't think about that. The device itself contains a write protected bootloader (can only be removed via jtag/swd) so it should always be able to recover from microSD. But signals could be affected in a crash.

EDIT: Don't think anything fatal will happen or it probably would have happened to me already...

Bryce

Yes, but the more low level access you give to the end user, the more endless support you're going to have to deal with.

Bryce.

TFM

Quote from: Bryce on 11:36, 13 June 16
Yes, but the more low level access you give to the end user, the more endless support you're going to have to deal with.

Bryce.


That should be left to the user. Why to take away potential features of a device? That's like to kick the spare wheel out of a car (or the turbo loader in this case). If somebody screws up then it's their problem, and with a protected loader it can't be that bad - just switch it on and off.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Quote from: TFM on 16:44, 13 June 16

That should be left to the user. Why to take away potential features of a device? That's like to kick the spare wheel out of a car (or the turbo loader in this case). If somebody screws up then it's their problem, and with a protected loader it can't be that bad - just switch it on and off.  :)

It's not that simple. The bootloader will only reload the source code from a correctly named file on a correctly formatted SD card. It's not just a simple turn it off and on. And believe me, the easier you make it possible for a user to break, the more support you need to give. This isn't a "leaving out the spare wheel", it's closer to "Let the owner decide the cylinder timing".

Bryce.

Duke

Bryce does have a point, I really don't like the "endless support" thing :)
There's many other things to be added/fixed/improved before I decide if this goes in anyway.

TFM

But who would actually use such an option? 2 or 3 guys here. Anybody else waits for somebody else doing software for new hardware. Just think how much guys did actually so something for cards like CPC Booster, MegaFlash (and clones), PlayCity or Albireo. That was ... very very few. So imho there is no such an endless support thing. But ok, talked enough, back to topic.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

It's not the intentional ones I'd be worried about, it's the ones that do it by mistake because it's possible.

Bryce.

TFM

Murphys law... will strike anyway.  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

You can keep Murphy to a minimum by restricting what the user can do.

Bryce.

TFM

Quote from: Bryce on 07:54, 14 June 16
You can keep Murphy to a minimum by restricting what the user can do.

Bryce.


Hmm... such a restricted system isn't of interest any longer for creative people.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Quote from: TFM on 15:21, 14 June 16

Hmm... such a restricted system isn't of interest any longer for creative people.

I didn't know that you're a proficient ARM Cortex M4 programmer. If that's the case, then you can easily bypass the restrictions with your JTAG Programmer anyway.

Bryce.

jomicamp

Hi Duke?
Are you already sending the boards?
I was in the initial list of interested people. How I should pay you the board for you to send it to me? Is there any website (this forum thread expands very fast and I have no time to check every comment sorry...)
Thank you and congratulations for your achievement!

Duke

#340
Yes, I have shipped about 11-12 now, I am unfortunately now again waiting for some components to arrive (they are in the hands of the customs for 10 days now!). Hopefully I get the critical packet friday so I can do a big pile during the weekend.
Check out page 1 of this thread: Amstrad CPC WiFi
There is a link to the list, I think you are ~44 on it.
Once your board is ready I will send you a pm with payment details and ask for your shipping address.
I can see you have not choosen connector, please let me know which you want (it helps the process if I dont have to contact people first asking for that). Options in first post too.

Quote from: jomicamp on 10:57, 15 June 16
Hi Duke?
Are you already sending the boards?
I was in the initial list of interested people. How I should pay you the board for you to send it to me? Is there any website (this forum thread expands very fast and I have no time to check every comment sorry...)
Thank you and congratulations for your achievement!

1024MAK

Quote from: Bryce on 08:28, 15 June 16
I didn't know that you're a proficient ARM Cortex M4 programmer. If that's the case, then you can easily bypass the restrictions with your JTAG Programmer anyway.
Whoa! :o  JTAG is one of the drinking game words :laugh:
Darn, just when I don't have a pint handy >:(

Mark
Looking forward to summer in Somerset :-)

Bryce

Quote from: 1024MAK on 12:02, 15 June 16
Whoa! :o  JTAG is one of the drinking game words :laugh:
Darn, just when I don't have a pint handy >:(

Mark

I'll drink to that![nb]or to anything in fact :)[/nb]

Bryce.

TFM

Quote from: Bryce on 08:28, 15 June 16
I didn't know that you're a proficient ARM Cortex M4 programmer. If that's the case, then you can easily bypass the restrictions with your JTAG Programmer anyway.
Bryce.

There is a lot you don't know about me. I'm an Atmel programmer too (see CPC Booster f.e.). But I don't have a JTAG programmer.[nb]There is nice software for PC to target all this systems, and if the hardware has an 'update' function, then no need to buy hardware like an expensive JTAG programmer. Have you ever heart of Ponyprog for ATMega16/32? Did you know that you can use the next higher MPU in CPC Booster easily and have double ROM?[/nb]
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Duke

Fwiw. you can simply place "upgrade" files on microSD.
The write protected bootloader I mentioned earlier is my own. It will load and flash the upgrades to Cortex M4 flashram and to the ESP8266 spiflash from microSD (fat32) on powerup.
Personally I use the cpcxfer program I put on github which is much quicker than using jtag or swd and if the wifi crashes you put it on microsd manually (or get a cheap st-link clone).
xfer -u 10.0.0.37 M4FIRM.BIN / 0 (upload firmware)
xfer -r 10.0.0.37 (reset M4 and reload it)

There is many other uses for this board if someone feels like it and want to explore it, I am limited by the choice of doing romboard emulation and few I/O ports, which requires very precise timing and litterally counting instruction clock cycles, when edges are triggered.
Should it be used as a proper accelerater for the CPC itself, instead of rom emulation, you'd do ram emulation and manipulation. Which I believe is possible in similar way to rom emulation.

I have not protected anything (which would have been super easy) and everything is in plain text so any uses are obviously welcome (on own risk etc). and if someone wants to know how the gpio is configured (which is all you need to know) just pm me.

Quote from: TFM on 16:42, 15 June 16
There is a lot you don't know about me. I'm an Atmel programmer too (see CPC Booster f.e.). But I don't have a JTAG programmer.[nb]There is nice software for PC to target all this systems, and if the hardware has an 'update' function, then no need to buy hardware like an expensive JTAG programmer. Have you ever heart of Ponyprog for ATMega16/32? Did you know that you can use the next higher MPU in CPC Booster easily and have double ROM?[/nb]

Bryce

Quote from: TFM on 16:42, 15 June 16
There is a lot you don't know about me. I'm an Atmel programmer too (see CPC Booster f.e.). But I don't have a JTAG programmer.[nb]There is nice software for PC to target all this systems, and if the hardware has an 'update' function, then no need to buy hardware like an expensive JTAG programmer. Have you ever heart of Ponyprog for ATMega16/32? Did you know that you can use the next higher MPU in CPC Booster easily and have double ROM?[/nb]

PonyProg is a serial programmer for AVR and PICs, you can't program JTAG devices with it.

Bryce.

Duke

However you can get a st-link clone with SWD (single wire debug) which is designed for the STM mcu's for about $5 from ebay, it's well worth the money. I have had a few occasions where I could only unlock the mcu with jtag (and probably I could have done it with st-link too, with the right the right settings). The upper pinheader which is not mounted (but available) on the board, provides signals for both jtag and swd (all labelled).
Quote from: Bryce on 20:46, 15 June 16
PonyProg is a serial programmer for AVR and PICs, you can't program JTAG devices with it.

Bryce.

Bryce

I have an original Xilinx and a Segger programmer to cover most JTAG jobs. I've seen there's an Arduino based solution too knocking about, but I haven't tried it.

Bryce.

TFM

Quote from: Bryce on 20:46, 15 June 16
PonyProg is a serial programmer for AVR and PICs, you can't program JTAG devices with it.

Bryce.


I mentioned in context to AVR.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

I know, but we had been talking about ARM programming.

Bryce.

Powered by SMFPacks Menu Editor Mod