Author Topic: Amstrad CPC WiFi  (Read 222726 times)

0 Members and 1 Guest are viewing this topic.

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1825 on: 14:28, 11 October 17 »
Just a thought that might make it easier for you if you assemble with WinApe.

From the WinApe documenation:
Quote
write [direct] filename[,exec_address]Direct generated code output to a file. For write direct the output is sent to a file on a disc image, and an optional execution address exec_address can be specified. For write without direct the output is sent to a file in the Windows file system.
You can write directly to the windows filesystem to output the binary.
Now just open a command prompt to where the file is written and have a copy of cpcxfer there, then use.
xfer -u yourm4ip joseman.bin / 0
xfer -x yourm4ip /joseman.bin

To test on the real CPC. 
You can also put those into a batch file and simply double click it from windows.


Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 769
  • Country: es
  • Liked: 613
Re: Amstrad CPC WiFi
« Reply #1826 on: 15:07, 11 October 17 »
Just a thought that might make it easier for you if you assemble with WinApe.

From the WinApe documenation:You can write directly to the windows filesystem to output the binary.
Now just open a command prompt to where the file is written and have a copy of cpcxfer there, then use.
xfer -u yourm4ip joseman.bin / 0
xfer -x yourm4ip /joseman.bin

To test on the real CPC. 
You can also put those into a batch file and simply double click it from windows.

yes i saw this option on winape, but the file generated is not executable by the cpc because it hasn't amsdos header (i need to insert it on a dsk and then extract again)... and the option [,exec_address] only works with write direct i think...

maybe i'm wrong or not using it correctly?


Offline SOS

  • Supporter
  • CPC6128
  • *
  • Posts: 213
  • Country: de
  • Identity lost
    • index.php?action=treasury
  • Liked: 133
Re: Amstrad CPC WiFi
« Reply #1827 on: 15:25, 11 October 17 »
I'm playing with the M4 and the command C_READDIR (asm), ...
Maybe you can use the |UDIR-RSX, which is also present in ACMEDOS (so you can do the programming in Winape) and
maybe in future OS's.

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 769
  • Country: es
  • Liked: 613
Re: Amstrad CPC WiFi
« Reply #1828 on: 15:39, 11 October 17 »
Maybe you can use the |UDIR-RSX, which is also present in ACMEDOS (so you can do the programming in Winape) and
maybe in future OS's.

i don't know so much about RSX commands and his implementation on an ASM program... are you sure that this RSX works exactly the same on AcmeDos & M4?

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1829 on: 16:45, 11 October 17 »
yes i saw this option on winape, but the file generated is not executable by the cpc because it hasn't amsdos header (i need to insert it on a dsk and then extract again)... and the option [,exec_address] only works with write direct i think...

maybe i'm wrong or not using it correctly?

You are right. I added option to cpcxfer to add a binary header.

It's done this way:
xfer -u <m4ipaddr> myfile.bin / 2 <start addr> <exec addr>

Attached working sample for WinApe. Just edit the runm4.bat file and change the IP address to yours, then you can run the file by double click on runm4.bat after assembling with WinApe.

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 769
  • Country: es
  • Liked: 613
Re: Amstrad CPC WiFi
« Reply #1830 on: 16:49, 11 October 17 »
You are right. I added option to cpcxfer to add a binary header.

It's done this way:
xfer -u <m4ipaddr> myfile.bin / 2 <start addr> <exec addr>

Attached working sample for WinApe. Just edit the runm4.bat file and change the IP address to yours, then you can run the file by double click on runm4.bat after assembling with WinApe.

Thankyou!!!

I will try later and tell you about it!

Offline SOS

  • Supporter
  • CPC6128
  • *
  • Posts: 213
  • Country: de
  • Identity lost
    • index.php?action=treasury
  • Liked: 133
Re: Amstrad CPC WiFi
« Reply #1831 on: 17:53, 11 October 17 »
i don't know so much about RSX commands and his implementation on an ASM program... are you sure that this RSX works exactly the same on AcmeDos & M4?
There are small differences, e.g. M4 has longer Dir-Names, ACMEDOS another Patch-Adress.
You must take a look, what MassOS do you use (if ACMDOS then PatchAdress=&be9a, if M4DOS then PatchAdress=&bea3).
The Advantage is, that you can develop it in WinApe and when it's error-free you can convert it for M4-DOS.
And not to forget, it runs on M4DOS + ACME :)

The |UDIR documentation can be found in "m4info.txt"

So PM me, than i can help you more...

Offline dxs

  • CPC664
  • ***
  • Posts: 109
  • Country: fr
  • Liked: 101
Re: Amstrad CPC WiFi
« Reply #1832 on: 23:40, 11 October 17 »
Maybe some sort of bug ? The ├╣update rsx sometimes returns straight to the ready prompt, skipping the "you're OK" message.
Still wondering how we spent so many years without the M4  ;)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1833 on: 23:48, 11 October 17 »
Maybe some sort of bug ? The ├╣update rsx sometimes returns straight to the ready prompt, skipping the "you're OK" message.
Probably, I didn't add too many error messages (lazy). Maybe DNS didn't resolve, I'll add it to the todo list.

Offline msmthng

  • Supporter
  • CPC664
  • *
  • Posts: 56
  • Country: at
  • Liked: 10
Re: Amstrad CPC WiFi
« Reply #1834 on: 15:24, 19 October 17 »
hi, how can i change the dsk file when a program (started from the sd) is running on the cpc?

Online Skunkfish

  • Supporter
  • 464 Plus
  • *
  • Posts: 377
  • Country: gb
    • Colour Personal Computing - The CPC Fanzine
  • Liked: 268
Re: Amstrad CPC WiFi
« Reply #1835 on: 15:28, 19 October 17 »
hi, how can i change the dsk file when a program (started from the sd) is running on the cpc?

I don't think it's possible from the CPC itself, but it may be possible from the web interface.

Offline msmthng

  • Supporter
  • CPC664
  • *
  • Posts: 56
  • Country: at
  • Liked: 10
Re: Amstrad CPC WiFi
« Reply #1836 on: 15:32, 19 October 17 »
I don't think it's possible from the CPC itself, but it may be possible from the web interface.
Changing the dsk on the webinterface doesn't change the dsk visible by the running program.

Gesendet von meinem HUAWEI VNS-L31 mit Tapatalk


Online Skunkfish

  • Supporter
  • 464 Plus
  • *
  • Posts: 377
  • Country: gb
    • Colour Personal Computing - The CPC Fanzine
  • Liked: 268
Re: Amstrad CPC WiFi
« Reply #1837 on: 15:36, 19 October 17 »
Ah, you're right.

I think the only option is to create a single directory and copy all files from both disks into there, cross fingers and hope it works!

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1838 on: 21:38, 19 October 17 »
Changing the dsk on the webinterface doesn't change the dsk visible by the running program.
Actually when using latest beta, you can use "CD on CPC" to change discs via the web interface while the CPC is running.
However putting all files in a single directory or a bigger DSK is probably a better solution, if possible.

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1839 on: 22:22, 24 October 17 »
Just toying a bit with setting up a convenient development environment for quick testing.
Was about to make a plugin for "Notepad++", to assemble and upload/run files, when I found there's an excellent plugin already for Notepad++, NPPExec where you can add multiple scripts.
So it was super easy to setup.
1st script for assembling a file via RASM (http://www.cpcwiki.eu/forum/programming/rasm-z80-assembler-in-beta/).
2nd script for uploading & executing the file on the CPC.
3rd script for resetting the CPC.
Afterwards they can be assigned to whatever keys, I use F5 assemble, F9 upload and execute, F10 reset.

[attachimg=1]

Still needs a bit of tweeking, as I need to pass the start address and entrypoint to the upload script, to add the AMSDOS header (should be solved when I get that working from RASM).
Also need script to load it up for debugging in WinApe, think the binary needs to be injected to a .dsk first and pass the sym table from rasm output aswell.
Eitherway, the simple scripts below, should anyone find it useful (Windows only!).

Notepad++ is free a can be downloaded here: https://notepad-plus-plus.org/download/
NPPexec plugin here: https://sourceforge.net/projects/npp-plugins/files/NppExec/

Scripts (I have RASM and cpcxfer in same dir as the source code, but easily changed if desired)

Assemble with RASM

cd $(CURRENT_DIRECTORY)
rasm $(FILE_NAME) -o  $(NAME_PART)

Run on CPC (IP 10.0.0.38, start address 0x1000, entrypoint 0x1000, modify for your needs!)

cd $(CURRENT_DIRECTORY)
xfer -u 10.0.0.38 $(NAME_PART).bin / 2 1000 1000
xfer -x 10.0.0.38 /$(NAME_PART).bin

Reset CPC

cd $(CURRENT_DIRECTORY)
xfer -s 10.0.0.38
« Last Edit: 22:24, 24 October 17 by Duke »

Offline GUNHED

  • 464 Plus
  • *****
  • Posts: 372
  • Country: de
  • Reincarnation of TFM
  • Liked: 168
Re: Amstrad CPC WiFi
« Reply #1840 on: 19:44, 25 October 17 »
Hi there!


Is it possible to deactivate (maybe a jumper?) the feature of the M4 to reset the CPC? It's no fun if you go to a meeting and somebody makes fun out of you to reset your CPC (just because you don't look at this guy sitting at a laptop and laughing... ehm hacking your CPC I mean).

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1841 on: 20:08, 25 October 17 »
Is it possible to deactivate (maybe a jumper?) the feature of the M4 to reset the CPC? It's no fun if you go to a meeting and somebody makes fun out of you to reset your CPC (just because you don't look at this guy sitting at a laptop and laughing... ehm hacking your CPC I mean).
When you leave for the meeting, do |wifi,0 to turn off the WiFi and |wifi,1 when you are back :)
I could implement a password for the web server, sometime ....

Offline GUNHED

  • 464 Plus
  • *****
  • Posts: 372
  • Country: de
  • Reincarnation of TFM
  • Liked: 168
Re: Amstrad CPC WiFi
« Reply #1842 on: 12:52, 26 October 17 »
Thanks! I was not aware that it's that easy.  :)

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.153
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1097
Re: Amstrad CPC WiFi
« Reply #1843 on: 00:17, 06 November 17 »
This may have been asked before but is there any possibility of cpm support for the mass storage? And perhaps WiFi?

Sent from my ONEPLUS 3t using Tapatalk


Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1844 on: 21:50, 14 November 17 »

Because of the two new very cool CPC plus demos from roudoudou & overflow, I had to make a small firmware update to support 512KB CPR's.

Both demos now run with M4 firmware v2.0.4 beta 8: Download from http://www.spinpoint.org/cpc/M4FIRM_v204b8.zip

If wanting to use 512KB CPR (cartridges images) you will have to sacrifice the upper 16 roms of the M4 romboard.
To do this, go to ROMS and tick "only 16 roms" (your upper 16 roms will be lost).
If this option is not ticked, only the first 256KB of the CPR image will be used (enough for all commercial games)


* M4_v204b8_2.jpg
(97.35 kB, 1024x558 - viewed 336 times)


Also added the ability to upload and start cartridges from the webinterface - soon to be added to cpcxfer aswell.
Remember to do a M4 reboot after uploading a .CPR/.BIN cartridge image, before it will be programmed into the M4 flash.

[attachimg=2]

No other additions or fixes this time (sorry!), work keeping me too busy. I just had to watch these new amazing productions on the real hardware :)

@CraigsBar:
Sorry for late reply, but I wanted to dig a bit more into it before giving a reply.
From what I reversed from AMSDOS rom, it should be possible to have CPM with M4 mass-storage support with some effort.
Easist would be to just support .DSK images for running CPM. A bit more work to add support to the FAT32 fs, but surely also possible.
However, not sure I can be motivated to do the effort for 1 or 2 people. Is anyone using CPM much these days on CPC?

EDIT:
cpcxfer updated too (v2.0.3)
To upload a cartridge image, use:
xfer -c <ipnum> filename
To program it:
xfer -r <ipnum>
To start it when done
xfer -p <ipnum>

Ie:
Code: [Select]
xfer -c 10.0.0.38 Eerie_Forest_(Logon_System_2017).cpr
xfer -r 10.0.0.38
xfer -p 10.0.0.38
Lastly updated the beta 8 archive, as I found a bug when uploading via webinterface (probably noone downloaded it yet..).
« Last Edit: 23:27, 14 November 17 by Duke »

Offline GUNHED

  • 464 Plus
  • *****
  • Posts: 372
  • Country: de
  • Reincarnation of TFM
  • Liked: 168
Re: Amstrad CPC WiFi
« Reply #1845 on: 18:46, 16 November 17 »
Well, I would be interested in CP/M support too. If you like I can provide the CP/M Plus source code with support for the Dobbertin hard-disc.  :)

Offline SOS

  • Supporter
  • CPC6128
  • *
  • Posts: 213
  • Country: de
  • Identity lost
    • index.php?action=treasury
  • Liked: 133
Re: Amstrad CPC WiFi
« Reply #1846 on: 10:32, 20 November 17 »
Christmas is coming soon and I have something on my wish list:  :D
In the ROM-List of Web-Frontend, there are buttons "Remove" / "Upload".
Is it possible to add "Disable" / "Enable" and see the actual status of the Rom ("enabled")?
(Thanks ;-) )

Offline SOS

  • Supporter
  • CPC6128
  • *
  • Posts: 213
  • Country: de
  • Identity lost
    • index.php?action=treasury
  • Liked: 133
Re: Amstrad CPC WiFi
« Reply #1847 on: 12:02, 20 November 17 »
2 compatibility-questions:
- M4 + XMEM:
  I can't get it together. I've tested:
  Switch M4-Config-Site - switch off "Enabled".
  XMEM: The ROM-Active-Jumper: Change it on every possible position.
  (maybe interesting: without M4 and open jumper on the XMEM, the ROMS are partial loaded (Screen corrupt, but e.g.|maxam works)).
- Has anyone the M4-Card and ACMEDOS with a CF-Card in use?
  I only can get them to function, if i use a DOM instead of a CF-Card.
  Without M4 and with XMEM the CF-Card works :o

Thanks

Offline GUNHED

  • 464 Plus
  • *****
  • Posts: 372
  • Country: de
  • Reincarnation of TFM
  • Liked: 168
Re: Amstrad CPC WiFi
« Reply #1848 on: 19:16, 20 November 17 »
2 compatibility-questions:
- M4 + XMEM:


Works fine here. No ROMs on the M4.


- Has anyone the M4-Card and ACMEDOS with a CF-Card in use?


ACME-DOS was made for the X-MASS using the DOM, nothing else. Try SymbOS instead and report if it works. Else you have to make a hardware check. Good luck.  :)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 851
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Amstrad CPC WiFi
« Reply #1849 on: 00:28, 21 November 17 »
If you like I can provide the CP/M Plus source code with support for the Dobbertin hard-disc.  :)


Thanks. For now I will not need it, as if I ever do it, it wont be anytime soon ;) - Noted 2 persons are interested!

In the ROM-List of Web-Frontend, there are buttons "Remove" / "Upload".
Is it possible to add "Disable" / "Enable" and see the actual status of the Rom ("enabled")?

Sure.
You can already use |romset,romnum,0 to disable a rom and |romset,romnum,1 to re-enable it. Will add it to the web-interface when I give the rom part a needed overhaul anyway.

2 compatibility-questions:
- M4 + XMEM:
  I can't get it together. I've tested:
  Switch M4-Config-Site - switch off "Enabled".
  XMEM: The ROM-Active-Jumper: Change it on every possible position.
  (maybe interesting: without M4 and open jumper on the XMEM, the ROMS are partial loaded (Screen corrupt, but e.g.|maxam works)).
- Has anyone the M4-Card and ACMEDOS with a CF-Card in use?
  I only can get them to function, if i use a DOM instead of a CF-Card.
  Without M4 and with XMEM the CF-Card works :o

M4 + XMEM
The normal way, would be to disable romboard function of XMEM, using the the "Read ROM" jumper, setting it to no.
However if you have a CPC where you can replace ROM7 (ie. 464/464+/6128+), you can set M4 rom to 7 and make no other roms are uploaded (M4 will only drive roms that are uploaded and enabled).
Thus you could use the roms of the XMEM instead, which does not drive ROM7.
You can also move the M4 romboard start position to 32, so the roms come right after XMEM roms, but you will need the M4 to be initialized somehow to use mass storage (ROM7 would work if possible).
If you switch off enabled in "ROMS" setup of M4, that means M4 rom will not be enabled.

M4 + XMASS

Not having an XMASS, I haven't done any tests, but the logical way to do it, would be:
M4 < XMASS < AMSDOS
Ie. M4 rom to 5
Xmass (acmedos) rom in 6
AMSDOS in rom 7

Now when you boot up, M4 will have the amsdos jump vectors (last initialized), if you do |disc, you theoretically should shift to XMASS. Use |SD to switch back to M4.
Hmm probably not what you asked, CF-card vs DOM, maybe a power consumption issue?