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

GUNHED

#2725
Thanks a lot, I'll let you know how it works...  :)

EDIT: The binary works as it should. Caring about source code now... :-)
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)

GUNHED

BTW: In the source code I assume an "RET" instruction is missing, but it doesn't matter, because fwrite does directly run into fclose. fwrite is not ended by a ret, classical typo!

Anything else works very fine! Thanks!  :) :) :)

New question: How can I write a file bigger than 64 KB actually?
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 18:53, 21 March 22BTW: In the source code I assume an "RET" instruction is missing, but it doesn't matter, because fwrite does directly run into fclose. fwrite is not ended by a ret, classical typo!

Anything else works very fine! Thanks!  :) :) :)

New question: How can I write a file bigger than 64 KB actually?
Yes, RET missing is a bug , thanks ! (added it to the source).
To write more than 64KB, just call fwrite again, without closing the file (fix missing RET!).


Fran123

hello

how can you test if m4 is connected in basic?

thank  you

dragon

I unable to make my 464 load 1.1 basic.


Even disconnecting all with only the m4 connected.(464+xmem+m4+ddi)

The 464 boot and then it scroll down after ready at the light of the speed forever in a  blue screen.

Try these tutorial:
https://auamstrad.es/hardware/m4-board-configuracion/

Or downloaded the 464 up directly from spinpoint.

Anny sugestions?




ajcasado

Quote from: dragon on 18:16, 24 March 22I unable to make my 464 load 1.1 basic.
Have you used the matching lower rom? It will not work with the 464 lower rom.
CPC 664

Empiezas a envejecer cuando dejas de aprender.
You start to get old when you stop learning.

pabloingreece

#2731
@Duke I have a problem out of nowhere, the m4 stop booting with the information of the card in the CPC. I tried to put different firmware versions, the report.txt says that programming is successful, but the card is not working properly.

What can I do to revive it?

Thanks. Also if there is a chance to order a new card (2019 version) I would like to proceed. Please let me know :)

Greetings!

CraigsBar

Quote from: dragon on 18:16, 24 March 22I unable to make my 464 load 1.1 basic.


Even disconnecting all with only the m4 connected.(464+xmem+m4+ddi)

The 464 boot and then it scroll down after ready at the light of the speed forever in a  blue screen.

Try these tutorial:
https://auamstrad.es/hardware/m4-board-configuracion/

Or downloaded the 464 up directly from spinpoint.

Anny sugestions?




I found the easiest way is to grab the 664 Lower Rom and 664 basic 1.1 Upload those with Basic in slot 0 and lower in slot 31. Set the low rom replacement in the M4webgui to enabled and using slot 31 and reboot. this will load both Lower and Basic from the SD card and give you a 664 (v2) sign on string if it all worked.
IRC:  #Retro4All on Freenode

Duke

Quote from: CraigsBar on 01:04, 27 March 22
Quote from: dragon on 18:16, 24 March 22I unable to make my 464 load 1.1 basic.


Even disconnecting all with only the m4 connected.(464+xmem+m4+ddi)

The 464 boot and then it scroll down after ready at the light of the speed forever in a  blue screen.

Try these tutorial:
https://auamstrad.es/hardware/m4-board-configuracion/

Or downloaded the 464 up directly from spinpoint.

Anny sugestions?




I found the easiest way is to grab the 664 Lower Rom and 664 basic 1.1 Upload those with Basic in slot 0 and lower in slot 31. Set the low rom replacement in the M4webgui to enabled and using slot 31 and reboot. this will load both Lower and Basic from the SD card and give you a 664 (v2) sign on string if it all worked.
Or just run the installer I made here:
https://www.cpcwiki.eu/forum/technical-support/the-compatibility-of-the-m4-card/msg179715/#msg179715

The scrolling you experince @dragon would indicate, that the corresponding lowerrom is not installed or active.

Duke

Quote from: pabloingreece on 17:30, 26 March 22@Duke I have a problem out of nowhere, the m4 stop booting with the information of the card in the CPC. I tried to put different firmware versions, the report.txt says that programming is successful, but the card is not working properly.

What can I do to revive it?

Thanks. Also if there is a chance to order a new card (2019 version) I would like to proceed. Please let me know :)

Greetings!
You can send it back to me for a checkup.
As for a new M4 board, there is 100+ people on waiting list, to when I get new supplies of the STM chips, these are the worst to get apparently, due to chip shortage :/

dragon

It don't apperar take the rom o.k maybe its i need put a power suply in the x4 board.It corrupt all times.

GUNHED

Hi Duke!
Thank's to your help I got now a couple of working basic routines for the M4 SD file usage.

However, can you please give me some hint which function to use to get the size of a file. Shall I use C_FSIZE? Is there some example code? From the docs I'm not sure which data I need to send to the M4 port.
Or would it be better to use another function of the M4? And how?
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 22:21, 28 March 22Hi Duke!
Thank's to your help I got now a couple of working basic routines for the M4 SD file usage.

However, can you please give me some hint which function to use to get the size of a file. Shall I use C_FSIZE? Is there some example code? From the docs I'm not sure which data I need to send to the M4 port.
Or would it be better to use another function of the M4? And how?
Yes, you can use C_FSIZE, it only needs the FD (file descriptor) which you derived from C_OPEN (fopen function...).

GUNHED

#2738
To use C_FSiZE, I do need to send bytes: &00, &11, &43, File-Descriptor-Byte
Right?

Reading bytes from M4 ROM at &E800: Which bytes do contain the file size?
Do the first four bytes contain the file size, starting with the low byte?

EDIT: The file size can be read from the M4 ROM bytes &E803-6 (little endian as Duke told).
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:12, 29 March 22To use C_FSiZE, I do need to send bytes: &00, &11, &43, File-Descriptor-Byte
Right?

Reading bytes from M4 ROM at &E800: Which bytes do contain the file size?
Do the first four bytes contain the file size, starting with the low byte?

Yes, send that sequence and yes the first 4 bytes contain the size, starting with the low byte (little endian format).



JayBlood

Hi Duke. Can I have any chance to give one card? Thank in advance. ;) You can tell me here if it possible, or PM me. :)
Regards.
Jay

Duke

Quote from: JayBlood on 23:10, 29 March 22Hi Duke. Can I have any chance to give one card? Thank in advance. ;) You can tell me here if it possible, or PM me. :)
Regards.
This is the standard reply I send to all that contacts me:

 Due to the world wide chip shortage situation, I cannot source chips for the M4 board for the time being.

I can put you on my list to when supply get back to normal again. But I don't know when it will be. Current lead time at suppliers is more than 50 weeks :/

 Let me know if I should put you on my list.

So please send me PM with your email address and I'll add you to my waiting list (of 100++ people) if you want to wait.
To those who have not had replies to emails/messages/posts, I will get back to you, but I do get about 20 requests a week and I usually collect them go through the entire lot every 10-14 days or so. Please have patience :-)

GUNHED

Getting ahead with M4 functions. One more question: What's the difference between C_READ and C_READ2?
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:28, 30 March 22Getting ahead with M4 functions. One more question: What's the difference between C_READ and C_READ2?
As the documentation states, it will not skip reading the AMSDOS header into the buffer, if it is present.
C_OPEN some file with AMSDOS header and C_READ2 it. Then the first 128 bytes of the buffer will contain the AMSDOS header. If you used C_READ instead, it would not put the AMSDOS header into the buffer.

JayBlood

Quote from: Duke on 11:01, 30 March 22
Quote from: JayBlood on 23:10, 29 March 22Hi Duke. Can I have any chance to give one card? Thank in advance. ;) You can tell me here if it possible, or PM me. :)
Regards.
This is the standard reply I send to all that contacts me:

 Due to the world wide chip shortage situation, I cannot source chips for the M4 board for the time being.

I can put you on my list to when supply get back to normal again. But I don't know when it will be. Current lead time at suppliers is more than 50 weeks :/

 Let me know if I should put you on my list.

So please send me PM with your email address and I'll add you to my waiting list (of 100++ people) if you want to wait.
To those who have not had replies to emails/messages/posts, I will get back to you, but I do get about 20 requests a week and I usually collect them go through the entire lot every 10-14 days or so. Please have patience :-)
No problem. I do. ;) Thanks!
Jay

GUNHED

Eventually I got my M4 routines together, so if somebody needs Maxam source code let me know.
One (hopefully) last question: What's the difference between C_READ and C_READ2?
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 15:18, 31 March 22Eventually I got my M4 routines together, so if somebody needs Maxam source code let me know.
One (hopefully) last question: What's the difference between C_READ and C_READ2?
Good.
You already asked about C_READ and C_READ2 ? :)  Did you mean some other functions? (C_WRITE?)

GUNHED

Oh, I had the impression that C_READ does sometime show headers of ASCII files, but I will just try some experiments. Sorry for asking twice.

However, thanks a lot for your excellent support!!!  :) :) :) :) :) :) :)
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 16:06, 01 April 22Oh, I had the impression that C_READ does sometime show headers of ASCII files, but I will just try some experiments. Sorry for asking twice.
No worries. Re-reading my reply, I can see it was a bit cryptic.

Let me try again.

C_READ   If the file is an AMSDOS file with valid header, it will not read the AMSDOS header into the rom buffer, only the actual data.
C_READ2 If the file is an AMSDOS file with valid header, it will read the AMSDOS header into the rom buffer, followed by the actual data.

Btw. ASCII files created on CPC can be without (AMSDOS) header.

GUNHED

For ASCII files I found the following:
C_READ provides an ASCII file (saved with Maxam) with Amsdos-compatible file header.
C_READ2 provides an ASCII file (saved with Maxam) with Amsdos-NONcompatible file header (the first &3F bytes seem to be &00).
Well, I stick with C_READ, should be just the right M4 function.  :)
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)

Powered by SMFPacks Menu Editor Mod