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 6 Guests are viewing this topic.

Duke

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.


Joseman

Quote from: Duke on 12:28, 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?


SOS

Quote from: Joseman on 09:07, 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.

Joseman

Quote from: SOS on 13:25, 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?

Duke

Quote from: Joseman on 13:07, 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.

Joseman

Quote from: Duke on 14:45, 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!

SOS

Quote from: Joseman on 13:39, 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...

dxs

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  ;)

Duke

Quote from: dxs on 21: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.
Probably, I didn't add too many error messages (lazy). Maybe DNS didn't resolve, I'll add it to the todo list.

msmthng

hi, how can i change the dsk file when a program (started from the sd) is running on the cpc?

Skunkfish

Quote from: msmthng on 13:24, 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.
An expanding array of hardware available at www.cpcstore.co.uk (and issue 4 of CPC Fanzine!)

msmthng

Quote from: Skunkfish on 13:28, 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


Skunkfish

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!
An expanding array of hardware available at www.cpcstore.co.uk (and issue 4 of CPC Fanzine!)

Duke

Quote from: msmthng on 13:32, 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.

Duke

#1839
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

GUNHED

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).
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Duke

Quote from: GUNHED on 17:44, 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 ....

GUNHED

Thanks! I was not aware that it's that easy.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

CraigsBar

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

IRC:  #Retro4All on Freenode

Duke

#1844

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)

[attach=2]

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:

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..).

GUNHED

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.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

SOS

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 ;-) )

SOS

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

GUNHED

Quote from: SOS on 11:02, 20 November 17
2 compatibility-questions:
- M4 + XMEM:


Works fine here. No ROMs on the M4.


Quote from: SOS on 11:02, 20 November 17
- 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.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Duke

Quote from: GUNHED on 17:46, 16 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!

Quote from: SOS on 09:32, 20 November 17
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.

Quote from: SOS on 11: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

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?


Powered by SMFPacks Menu Editor Mod