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

Animalgril987

If both ROMs are "background", then take a look at the firmware routines "SIDE CALL", or "FAR CALL". they might do want you want. And you could alway put a customised version of one of them into your ROM, to suit your needs. :D

GUNHED

Well, I talked about problems with the Hack-Menu.
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)

caver99

is there anywhere one of these can be got today

SkulleateR

Quote from: caver99 on 11:26, 01 August 21
is there anywhere one of these can be got today
Just send a msg to @Duke  :)

Duke

Due to the chip shortage situation it is not possible for me to get new supplies of the STM chips used for either M4 nor Imperium Solo boards at the moment.
Resellers such as digikey, mouser, arrow have lead times at around 50 weeks for those chips.
Everything is going out on contracts to ie. car industry. I have tried multiple times to buy small batches (50+) from chinese resellers, but every time, even though paying several 100% over price, they eventually cancel the order and raise the price again, so I have not bothered to pursue this route any further and this includes utsource - before someone suggests that.

So as it is, it will be quite some time before I can produce new boards :/

Meanwhile I still add people to my waiting list, to when and if supply and prices get back to normal.

Duke

#2680
Quote from: GUNHED on 16:44, 29 July 21
Well, I want to access the M4 card from a ROM.

Do I need to do this using a routine in RAM, or is there a trick?

Could the M4 ROM be 'declared' as lower ROM for example for a short time, just to access the M4 ROM = lower ROM from an upper ROM?

Any tricks or ideas?

If you find it useful I can add the option to the new C_ROMLOW command:
C_ROMLOW            0x433D         Implemented v2.0.7. Map lower rom : data[0] = 0 system lower rom, 1 = lowerrom from romboard if enabled, 2 = lowerrom from HACK menu.

so 3 = M4 rom upper, mapped as lower ?

Otherwise it is the RAM way.

GUNHED

Sorry, I'm not into that stuff to much at the moment, but I will have a look later on. (Cause I just soldered the hack button on my boards few time ago).


Everything needed would be something like that:

- When the hack button is pressed: store the upper ROM number somewhere... (this is possible, since the hack menu does display that number)

- Do your hack stuff...

- When quitting hack menu: Restore previous upper ROM


Maybe some M4 user can do that. :-)
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 12:49, 02 August 21
- When the hack button is pressed: store the upper ROM number somewhere... (this is possible, since the hack menu does display that number)

- Do your hack stuff...

- When quitting hack menu: Restore previous upper ROM
This is already being done in the hack menu.

Have a looksy here:
The upper-rom number is stored here:
https://github.com/M4Duke/m4hackmenu/blob/master/nmirom.s#L102
(by the M4 hardware)

And it is restored here, with the jump back routine, which in the end goes to RAM 0xFFF0 :
https://github.com/M4Duke/m4hackmenu/blob/master/nmirom.s#L499


GUNHED

Yes, and there we have the problem: Let's say Maxam or Protext currently exercises code in the upper ROM, then the hack menu will NOT return to ROM.


The hack menu needs to check if code is exercised in ROM or RAM. Do not jump to RAM in every case.


It's more clear if you use the hack button a couple of times when using a ROM program.
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:22, 02 August 21
Yes, and there we have the problem: Let's say Maxam or Protext currently exercises code in the upper ROM, then the hack menu will NOT return to ROM.


The hack menu needs to check if code is exercised in ROM or RAM. Do not jump to RAM in every case.


It's more clear if you use the hack button a couple of times when using a ROM program.
Yeah actually it hit me right after writing it, IF the upperrom was enabled, then crash and burn. Anyway will have to think of a fix. Now that it is open source anyone can "hack" into it and do a patch, so feel welcome :)

GUNHED

Hi @Duke : Well, I had a look at the new M4 documentation, but somehow got lost. Maybe you could point me to documentation or coding examples (Z80 code) of the following:
- Read directory
- Change directory
- Read file
- Save file
- Erase file
- Remane file

All for the SD card of the M4 board. I really would appreciate some help here.  :) :) :)
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 14:24, 13 September 21
Hi @Duke : Well, I had a look at the new M4 documentation, but somehow got lost. Maybe you could point me to documentation or coding examples (Z80 code) of the following:
- Read directory
- Change directory
- Read file
- Save file
- Erase file
- Remane file

All for the SD card of the M4 board. I really would appreciate some help here.  :) :) :)

Most certainly.

You will in this example:
https://github.com/M4Duke/M4examples/blob/master/romup.s

Find reading and writing files natively without amsdos. Basically look at (/or copy) the functions fopen, fread, fwrite, fseek, fclose.

If you dig those functions I am sure the cd, erase and rename will be trivial. The directory can be more tricky. You can look at the m4 rom source code for directory function:
https://github.com/M4Duke/m4rom/blob/master/M4ROM.s#L2038

Let me know if it gives you problems, then I can probably setup another couple of examples.
You may look at the m4 code for unidos aswell, it should contain needed bits aswell.


XeNoMoRPH

What about M7? ... 🤔🤔
your amstrad news source in spanish language : https://auamstrad.es

Duke


CraigsBar

IRC:  #Retro4All on Freenode

XeNoMoRPH

your amstrad news source in spanish language : https://auamstrad.es

GUNHED

Quote from: Duke on 17:14, 13 September 21
The directory can be more tricky. You can look at the m4 rom source code for directory function:
https://github.com/M4Duke/m4rom/blob/master/M4ROM.s#L2038
Thanks for all the links. I would say, a simple example would be good for: Read SD card directory contents (actual DIR level) to RAM (fixed address). Something basic. The example in your ROM is actually quite complex.  ;) :)
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 02:07, 15 September 21
Thanks for all the links. I would say, a simple example would be good for: Read SD card directory contents (actual DIR level) to RAM (fixed address). Something basic. The example in your ROM is actually quite complex.  ;) :)

No problem.
I made a quick example for you here:
https://github.com/M4Duke/M4examples/blob/master/getdir.s

As you did not need any display code, I just make it start the hack menu after getting the directory.
You can display memory at 0x4000 to see the directory it retrieved (in the example from /m4 directory).

Hope it helps!

GUNHED

Thank you very much!!! That's great!!!
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)

pelrun

Quote from: CraigsBar on 13:35, 14 September 21

Nooooooooooo! 😭😭😭😭
I'm working on something similar (but closer to the IZE80 from another recent thread) although I wish I knew why my GX4000 is halting the clock as soon as I assert /IORQ...  ??? I should probably use my 6128 instead but it takes up more space on the bench...

evolutional

Quote from: Duke on 18:48, 01 August 21

Meanwhile I still add people to my waiting list, to when and if supply and prices get back to normal.

Please add me to that waiting list!

Fessor

Please add me to the List too.

Duke

Quote from: Fessor on 16:43, 08 November 21
Please add me to the List too.

Please pm me with your email address and type needed (EDGE or IDC) or even better email me at duke (a) spinpoint.org (so you whitelist my email).

Be aware that currently I cannot source the MCU's needed for neither M4 Board or Imperium Solo at normal prices, due to the chip shortage situation :/
However I have finally been able to get some SMALL batches of over priced chips for the M4 board, which I offer as an alternative (at the added cost) when I work my way down the list (which is about 60 M4 boards at the moment). So there is hope, but nothing quick, unfortunately.

GUNHED

Well.... then this is the perfect time just to think maybe about emulating the Dobbertin HD20 hard-disc with the M4 board. This would be a dream.  :) :) :)
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)

Joseman

Hi @Duke

What do you think about this way to add the hack button to the M4?

I think it's easy, you can disconnect the button when you need it and you don't touch the ESP.

Powered by SMFPacks Menu Editor Mod