Author Topic: Amstrad CPC WiFi  (Read 312320 times)

0 Members and 3 Guests are viewing this topic.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.292
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 720
  • Likes Given: 1569
Re: Amstrad CPC WiFi
« Reply #2300 on: 17:21, 01 January 19 »
Maybe not all devices like the use of the NMI signal. Not sure if that is the problem with PlayCity (don't have one).
The PlayCity can use the NMI by itself (not used by default though). So maybe there is a hardware interference. I do have one and can run tests if needed.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2301 on: 18:14, 01 January 19 »
Pokes using the CPCEMU poke database format would be awesome, especially if the M4 remembers the name of the last runned game to position to the first letter of the poke database or even the good name of the database.
Cool. Will look into that if I can find any info on it.
Quote
I have started to use directories, in the web page if I have moved into a directory, a file uploaded will still be at the root of the SD. Would it be possible to upload to the current directory on the web page ?
This already works, atleast if you use the big "drop & drag" window to upload files.
So if it's not working it may be something particular with your directory structure. Can you give me an example I can try?

nice job Duke with beta 7I have some graphic color bugs when I'm using the snapshot function on my CPC6128 CRTC1 .
and when I'm typing the filename on my CPC, it is running too fast, to all my letters entries are double. I have to press each keys very fast.TTEESSTT.SSNNAA  ;D
Thanks for testing, will have to dig up my CRTC1 CPC6128. Sounds like the mainloop is too quick so it runs within the vsync, multiple times.
Users always ask for more so mayke a AZERTY keyboard support in hack menu, or a way to launch hack menu from the CPC itself would be great but anyway here is a huge thank you for your work!!
Will be easy to add AZERTY support. And yeah, I may add so an external switch can be connected to one of the GPIO pads. of the top connector.
The PlayCity can use the NMI by itself (not used by default though). So maybe there is a hardware interference. I do have one and can run tests if needed.
Maybe it's driving the NMI line, so there is a bus contention when M4 (tries to) drive it. I only drive it when entering the hack menu, so I don't think I can do anything on my side to change the likely conflict.



Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.382
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2581
  • Likes Given: 1507
Re: Amstrad CPC WiFi
« Reply #2302 on: 19:26, 01 January 19 »
Just a little question: Is the PlayCity had worked with the previous version of the M4 firmware?
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 487
  • Country: de
    • index.php?action=treasury
  • Liked: 241
  • Likes Given: 1176
Re: Amstrad CPC WiFi
« Reply #2303 on: 21:52, 01 January 19 »
Yes, e.g. togehter with the 1MB memory expansion I was able to start from the M4 board and drive Shinings "Bad Apple" demo correctly (as far as I can judge...)
« Last Edit: 22:02, 01 January 19 by HAL 6128 »
...proudly supported Pentomino and NQ-Music-Disc with GFX

Offline dxs

  • CPC664
  • ***
  • Posts: 116
  • Country: fr
  • Liked: 111
  • Likes Given: 19
Re: Amstrad CPC WiFi
« Reply #2304 on: 22:55, 01 January 19 »
And yeah, I may add so an external switch can be connected to one of the GPIO pads. of the top connector.
Yes please that would be awesome, turning m4 into a super-multiface along with poke capability!

Offline Maniac

  • CPC6128
  • ****
  • Posts: 183
  • Country: gb
  • Liked: 66
  • Likes Given: 58
Re: Amstrad CPC WiFi
« Reply #2305 on: 23:56, 01 January 19 »
M4 Firmware v2.0.5 beta 7 now available.
Download here: http://www.spinpoint.org/cpc/M4FIRM_v205b7.zip

New feature is Hack Menu
This will allow you to save snapshots (SNA's) while playing games and other things.
Also possible to load snapshots from it.
Later if there is enough interest, I can add stuff like:
  • Pokes
  • Hex editor
  • Screenshot
It is very beta atm. so probably full of bugs :)
See video here for usage:

https://youtu.be/N2Vdeu-x1mo


Happy new year !
Tried this out today and I’m afraid I found it either slow to start or unreliable on my 6128 Plus. Maybe this is expected behaviour and fully appreciate it’s a beta. So for example if I run the Pinball Fantasies preview and click Hack Menu the menu never appears. Whereas with other games it took a while for it to appear. Not sure if this is because I’m using a C4CPC cart as didn’t test without.

One further piece of feedback is that shifted characters on the number keys don’t appear to work. Some of my snapshot file names have brackets so I couldn’t type those file names as shift+8 just generates an 8.

Great starting point though and a great dev tool ultimately for debug like the HackIt for Siren Software back in the day.

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2306 on: 07:12, 02 January 19 »
So for example if I run the Pinball Fantasies preview and click Hack Menu the menu never appears.
Is it just Pinball Fantasies, or was it failing to start up with other games too? (examples appreciated, so I can test).
Quote
Whereas with other games it took a while for it to appear. Not sure if this is because I’m using a C4CPC cart as didn’t test without.
Slow depends a bit on your microSD card speed. When the hack menu is activated, memory will be written to the microSD. With a class 10 microSD card which I use, this takes about 1 second all in all.
It may take longer with older microSD's, which may be the reason for the slowness you experince?
Quote
One further piece of feedback is that shifted characters on the number keys don’t appear to work. Some of my snapshot file names have brackets so I couldn’t type those file names as shift+8 just generates an 8.
Yup, I only added one keymap so far (it's all lowlevel, not using the CPC firmware), so no checking for shift or lowercase characters.
Quote
Great starting point though and a great dev tool ultimately for debug like the HackIt for Siren Software back in the day.
Thanks. Guess it's more like the multiface 2 in the way it works.
The method goes like this:
When "Hack Menu" is activated, NMI is triggered along with RAMDIS and ROMDIS and M4 maps the lowerrom/ram area with its own dynamic rom "hack rom" (containing the menu code, save code etc).
Z80 registers are stored via M4 commands to the hack rom (hence dynamic) and 16 bytes of ram is used aswell (0xFFF0) as this is thrashed anyway when using the sna loader.
CRTC, Gate Array, PSG, Romsel and PPI registers are watched by the M4 core handler when the CPC is running at all time, and copied into the hack rom, when the NMI is triggered.
At entry RAM is saved to a temporary file, so the menu can use the screen to show registeres, menu options etc.
At exit, RAM is reloaded and a minimal exit routine is written to 0xFFF0 (so both upper and lower roms can be disabled if RMR had them disabled) that resumes the game/whatever was running.
« Last Edit: 07:14, 02 January 19 by Duke »

Offline Maniac

  • CPC6128
  • ****
  • Posts: 183
  • Country: gb
  • Liked: 66
  • Likes Given: 58
Re: Amstrad CPC WiFi
« Reply #2307 on: 11:08, 02 January 19 »
Is it just Pinball Fantasies, or was it failing to start up with other games too? (examples appreciated, so I can test).
I’ll check a few more when I get some time to do so.

Slow depends a bit on your microSD card speed. When the hack menu is activated, memory will be written to the microSD. With a class 10 microSD card which I use, this takes about 1 second all in all.
It may take longer with older microSD's, which may be the reason for the slowness you experince?
That makes a lot of sense. Can’t find a class marking on my SanDisk Ultra card but pretty certain it’s not class 10!

The method goes like this:
When "Hack Menu" is activated, NMI is triggered along with RAMDIS and ROMDIS and M4 maps the lowerrom/ram area with its own dynamic rom "hack rom" (containing the menu code, save code etc).
Z80 registers are stored via M4 commands to the hack rom (hence dynamic) and 16 bytes of ram is used aswell (0xFFF0) as this is thrashed anyway when using the sna loader.
CRTC, Gate Array, PSG, Romsel and PPI registers are watched by the M4 core handler when the CPC is running at all time, and copied into the hack rom, when the NMI is triggered.
At entry RAM is saved to a temporary file, so the menu can use the screen to show registeres, menu options etc.
At exit, RAM is reloaded and a minimal exit routine is written to 0xFFF0 (so both upper and lower roms can be disabled if RMR had them disabled) that resumes the game/whatever was running.
Thanks for the explanation. It’s great to understand what’s going on in the background to make stuff like this work. I’m guessing that this won’t work for Plus cartridge titles as you’re not storing the ASIC registers etc?

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2308 on: 11:56, 02 January 19 »
I’m guessing that this won’t work for Plus cartridge titles as you’re not storing the ASIC registers etc?
Yes that's correct, maybe thats something for another time, but guess there is so little plus software, it wont justify the time I need to spend on that.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.292
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 720
  • Likes Given: 1569
Re: Amstrad CPC WiFi
« Reply #2309 on: 22:44, 02 January 19 »
Hi Duke,

Here is a bug report.

From the SD-Card (inside an DSK) it seems to be impossible to load binary files.

When using the FutureOS installer from disc it works, but not from a DSK on the SD-card. The problem is that:

MEMORY &33FF:LOAD"FLASHALL.Z80",&3400

does not work. Instead of loading the file, the memory remains to be filled with zeros.
Here is the DSK (you can look inside file DISC.BAS beginning at line: 3050).

Please help!  :)
« Last Edit: 22:46, 02 January 19 by GUNHED »
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2310 on: 10:40, 03 January 19 »
MEMORY &33FF:LOAD"FLASHALL.Z80",&3400

does not work. Instead of loading the file, the memory remains to be filled with zeros.
Here is the DSK (you can look inside file DISC.BAS beginning at line: 3050).
A quick look at the file "FLASHALL.Z80", the AMSDOS header has file size set to 0 (offset 19 and 20).
According to Soft 968:
"Data length 19...20 As per cassette"
So if it loads using a real disc drive, I guess I should not be using those fields, with cas_in_direct.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.292
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 720
  • Likes Given: 1569
Re: Amstrad CPC WiFi
« Reply #2311 on: 17:28, 03 January 19 »
A quick look at the file "FLASHALL.Z80", the AMSDOS header has file size set to 0 (offset 19 and 20).
According to Soft 968:
"Data length 19...20 As per cassette"
So if it loads using a real disc drive, I guess I should not be using those fields, with cas_in_direct.

Ah that explains it! Filesize is only important for few files. All disc routines do read the number of blocks or number of records from the directory entry. Can you make the M4 loading routine compatible with that? Would be easy, if file size is set to zero, then check if the directory entry has blocks and how much.  :)

Lots of assemblers do save a binary file with file size 0, because they just don't know the final size of the file.

I'm surprised that nobody did find this problem before.  :o  But most people probably are doing gaming.  ;) :)
« Last Edit: 17:31, 03 January 19 by GUNHED »
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2312 on: 18:59, 03 January 19 »
Ah that explains it! Filesize is only important for few files. All disc routines do read the number of blocks or number of records from the directory entry. Can you make the M4 loading routine compatible with that?
Yup, np. Will do so, soonish :)

Quote
But most people probably are doing gaming.  ;) :)
Think so too !

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.292
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 720
  • Likes Given: 1569
Re: Amstrad CPC WiFi
« Reply #2313 on: 21:44, 03 January 19 »
You've been right. I adapted the header (by loading, erasing and saving the file) and now it all works well from SD-card too.  :)
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline Festevez

  • Speccy
  • *
  • Posts: 1
  • Country: es
  • Liked: 1
  • Likes Given: 0
Re: Amstrad CPC WiFi
« Reply #2314 on: 22:15, 03 January 19 »
Hi everybody


My name is Francisco, from Tenerife, Canary Islands. I started using MSX in the 80´s, my first computer ( ;D ), and nowadays I enjoy allmost every system that fall into my hands.


I have seen the M4 board created by Duke working, thanks to some fellows from our retro group, CanariasGoRetro. http://www.canariasgoretro.org/


I would like to buy a M4 board to use with my CPC464. So, a question to Duke, is still possible to buy the M4 board?


Thanks to Duke for creating this amazing must have board, regards for all fellows! :)

Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 1.054
  • Country: gr
    • Parts from the past.
  • Liked: 528
  • Likes Given: 1467
Re: Amstrad CPC WiFi
« Reply #2315 on: 22:59, 03 January 19 »
Great choice, you will not be disappointed  ;)
To blit, or not to blit?
Amiga 1200 Black Project

Offline cpcoldie

  • CPC464
  • **
  • Posts: 9
  • Country: at
  • Liked: 6
  • Likes Given: 13
Re: Amstrad CPC WiFi
« Reply #2316 on: 23:50, 03 January 19 »
Ah that explains it! Filesize is only important for few files. All disc routines do read the number of blocks or number of records from the directory entry. Can you make the M4 loading routine compatible with that? Would be easy, if file size is set to zero, then check if the directory entry has blocks and how much.  :)

Lots of assemblers do save a binary file with file size 0, because they just don't know the final size of the file.

I'm surprised that nobody did find this problem before.  :o  But most people probably are doing gaming.  ;) :)
I had this problem as I mentioned earlier in this thread, but not in this details.
http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/amstrad-cpc-wifi/msg168087/#msg168087
Thanks for reporting this!
And many thanks to Duke for his awsome work!

Cheers



Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2317 on: 09:29, 04 January 19 »
I would like to buy a M4 board to use with my CPC464. So, a question to Duke, is still possible to buy the M4 board?

Yes I still make them. Generally there is a 4-5 weeks lead time before I can have one ready.
Just send me a private message with your email address + what connector you want on the M4 board (IDC or EDGE) and if you need an adapter or cable (see options and prices in first post of this thread).
« Last Edit: 09:30, 04 January 19 by Duke »

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.292
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 720
  • Likes Given: 1569
Re: Amstrad CPC WiFi
« Reply #2318 on: 15:25, 04 January 19 »
It's totally ok to have some kind of "known errors" list, I have that for some stuff I made. Then it's more easy for people who encounter problems to find out what's going on.
Thanks a lot to Duke who is doing the debugging for us  ;D  Keep the great work going  :)

http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline francouai

  • CPC664
  • ***
  • Posts: 112
  • Country: fr
  • CPC6128+
  • Liked: 25
  • Likes Given: 25
Re: Amstrad CPC WiFi
« Reply #2319 on: 19:27, 04 January 19 »
Duke, how many M4 card have you sold?


Are you thinking for an hardware upgrade to have more functionality? Like more memory, CPC+ cartridges, clocks, etc..
--
francois

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2320 on: 07:14, 05 January 19 »
Duke, how many M4 card have you sold?
~ 570 pcs.

Quote
Are you thinking for an hardware upgrade to have more functionality? Like more memory, CPC+ cartridges, clocks, etc..
Yes see : http://www.cpcwiki.eu/forum/amstrad-cpc-hardware/galaxy-zen80-boards/
If I ever finish them :)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2321 on: 10:08, 05 January 19 »
Users always ask for more so mayke a AZERTY keyboard support in hack menu

If anyone feels like giving me hand with AZERTY support for French and Spanish keyboards, please edit my QWERTY table below with correct characters for AZERTY keyboard.

THANKS !! :)

key_translate:
        db '.', 13,'3','6','9',0x0,0x0,0x0  ; numeric keys
        db '0','2','1','5','8','7',0x0,0x0  ; numeric keys
        db 0x0,''',0x0,'4',']', 13,'[',0x0
        db '.','?',':',';','p','@','-','^'
        db ',','m','k','l','i','o','9','0'
        db ' ','n','j','h','y','u','7','8'
        db 'v','b','f','g','t','r','5','6'
        db 'x','c','d','s','w','e','3','4'
        db 'z',0x0,'a',0x0,'q', 27,'2','1'
        db 0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0
key_translate_shift:
        db '.', 13,'3','6','9',0x0,0x0,0x0 ; numeric keys
        db '0','2','1','5','8','7',0x0,0x0 ; numeric keys
        db 0x0,'/',0x0,'4','}', 13,'{',0x0
        db '>','/','*','+','P','|','=','^'
        db '<','M','K','L','I','O',')','_'
        db ' ','N','J','H','Y','U',''','('
        db 'V','B','F','G','T','R','%','&'
        db 'X','C','D','S','W','E','#','$'
        db 'Z',0x0,'A',0x0,'Q', 27,'"','!'
        db 0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0

It correspond to the Hardware scancode table:
http://www.cpcwiki.eu/index.php/Programming:Keyboard_scanning
« Last Edit: 11:06, 05 January 19 by Duke »

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2322 on: 15:10, 05 January 19 »
M4 Firmware v2.0.5 beta 8 now available.
Download here: http://www.spinpoint.org/cpc/M4FIRM_v205b8.zip
Unpack to root of your microSD.

  • Fix DSK file size 0 bug
  • Fix |longname / C_FSTAT bug, now (again) displaying long filenames properly.
  • Fix Hack menu - Slowdown keyboard reading.
  • Added Hack menu - Support full keyboard character set (QWERTY only for now).
  • Added Hack menu - Pokes (Press ESC when done entering pokes)
  • Added Hack menu - Display memory

Offline dxs

  • CPC664
  • ***
  • Posts: 116
  • Country: fr
  • Liked: 111
  • Likes Given: 19
Re: Amstrad CPC WiFi
« Reply #2323 on: 17:22, 05 January 19 »
Hi!
I'll make the AZERTY scan code table.
However I have a question, when reading your QWERTY table, I don't get why for example, line 3, row 2, I find the character " ' " (which should be " \ " ??) and when shifted I read " / ", whereas I should find " ' ".
What did I miss?
Thanks for latest beta!

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.099
  • Country: dk
    • spinpoint.org
  • Liked: 1181
  • Likes Given: 847
Re: Amstrad CPC WiFi
« Reply #2324 on: 18:19, 05 January 19 »
I'll make the AZERTY scan code table.
However I have a question, when reading your QWERTY table, I don't get why for example, line 3, row 2, I find the character " ' " (which should be " \ " ??) and when shifted I read " / ", whereas I should find " ' ".
What did I miss?
Great, thanks. Much appreciated!

You found a mistake, I swapped shifted, with not shifted. And I ignore '\' as it will be translated into '/' anyhow (filepath), probably there is some more I should filter out later, so they don't cause problems in filenames.