Page 1 of 1

[MZ-SD²CMT / MZ-CH376] Ideas for fast loader/saver program without the need of GUI on the SD device

Posted: Tue Oct 30, 2018 9:32 am
by hlide
You probably know about my project MZ-SD²CMT (Arduino MEGA with a LCD, buttons, a SD card reader) which emulates a tape recorder and have a special ultra-fast mode to load a binary program the fastest way. I also have another ongoing project using a CH376 (can read/write USB mass storage key and SD card) directly connected to the MZ-700 board (Z80 drives the CH376 controller).

For the first project, I would like to see a solution where I could avoid the GUI so I can easily put the Arduino MEGA inside the MZ-700 to contain all the wires inside as well. The SD card reader may also be inside if I add a SD wire and some Velcro bands.

For the second project, depending on the CH376 board (can be only USB or both USB and SD), it could also put inside the MZ-700 using USB wire and/or SD wire. Not so much different from the first project.

The main issue is that you need a Z80 software for both projects to allow fast transfer between the MZ and the device.

If we exclude rewriting the ROM, what are the solution?

First project:

1) In the monitor prompt, typing L will trigger the Arduino MEGA to load the special software in memory (Normal PWM header + Normal tiny Ultra-fast loader program + Ultra-fast mode real program). Once launched, several possibilities:

1.1) MZ-700 can copy the monitor ROM in RAM, patch the copied monitor to allow direct Ultra-fast mode loading/saving then go back in the monitor prompt in RAM. The tricky part is when and how to prompt for a file name to load/save. The coolest thing would be to be able to popup a file browser.

1.2) Launch a tool. You can load or save or run a program in normal or ultra-fast mode. No monitor patching. No tricky part as the tool is in charge.

1.3) Launch an IPL. Choices can be: going back after or without patching the Monitor code (ROM->RAM), launching the tool embedded in the IPL, and so on.

Second project: I believe it is quite similar to the first project.

if someone has more ideas about how to achieve it, I'll be glad to hear about them.

Re: [MZ-SD²CMT / MZ-CH376] Ideas for fast loader/saver program without the need of GUI on the SD device

Posted: Sun Nov 04, 2018 9:32 pm
by Pacman
EN:

Hello,

Since August I am on a CH376 card project with IPL rom. It works and is soon finished: Soon I will reveal all sources and PCBs.


FR:

Bonjour,

Depuis août je suis sur un projet de carte CH376 avec rom IPL. Il fonctionne et est bientôt fini : Bientôt je vais dévoiler toutes les sources ainsi que les cartes PCB.

Re: [MZ-SD²CMT / MZ-CH376] Ideas for fast loader/saver program without the need of GUI on the SD device

Posted: Sat Dec 08, 2018 9:43 am
by Pacman
EN:

Hello,

I come back to my project using a CH376 for SHARP MZ-700.
It uses an IPL ROM at address $ E800 of 4096 bytes (ROM 2732) and I programmed a file browser in the form of a midnight commander (for those who know linux) as well as an online interface of command that version 2 of K & P's disk interface inspired me, all in assembler.

I just finished the navigation part in the files and commands online, I still have more than boot and some bugs like the non response CH376 or USB key.

I have not yet implemented a file sorter in alphabetical order, because I have a problem of memory location: or put all these names of files knowing that one can very easily arrive at more than 500 ...
So currently, they are displayed in the order of arrival.
Aside from adding an extra RAM and a micro-controller management, I do not see how we could do this with the SHARP 64k base.
If anyone has an idea, I'm interested in completing this project.

Thank you.



FR:

Bonjour,

Je reviens sur mon projet utilisant un CH376 pour le SHARP MZ-700.
Il utilise une ROM IPL a l'adresse $E800 de 4096 octets (ROM 2732) et j'ai programmé un navigateur de fichiers sous la forme d'un midnight commander (pour ceux qui connaissent linux) ainsi qu'une interface en ligne de commande que la version 2 de l'interface disque de K&P m'a inspiré, le tout en assembleur.

Je viens de terminer la partie navigation dans les fichiers et les commandes en ligne, il me reste plus que l'amorçage et les quelques bugs comme la non réponse du CH376 ou de la clef USB.

Je n'ai pas encore implémenté un trieur de fichiers en ordre alphabétique, car j'ai un soucis d'emplacement mémoire : ou mettre tous ces noms de fichiers sachant que l'on peut très facilement arriver a plus de 500...
Donc actuellement, ils s'affiche dans l'ordre d'arrivée.
À part ajouter une RAM supplémentaire et un micro-controleur des gestion, je ne vois pas comment on pourrait faire ceci avec les 64ko de base du SHARP.
Si quelqu'un a une idée, je suis preneur afin de terminer ce projet.

Merci.

Re: [MZ-SD²CMT / MZ-CH376] Ideas for fast loader/saver program without the need of GUI on the SD device

Posted: Sat Dec 08, 2018 11:09 am
by hlide
Cool! Is the project source available? I'm totally interested in your browser to make a version for MZ-SD²CMT without GUI with all the credits to you for this part.

For the entry order issue, there are some PC softwares which can reorder physically the entries in the alphabetical order.

I don't know if CH376 allows direct access to directory entries so you could manage to order physically through a partition sort.

Or you could generate an order list file to index the entries in the chosen order again through a partition sort.

Instead of filling the memory with all the entries of a directory, you fill with their indices. You're comparing two sectors of entries. If one entry of your two indices to compare is outside the two sectors, just fetch the right sector. It may be slow though.

EDIT:
Or you can handle an entry cache as I realized you cannot really access a sector with CH376. The cache will associate an index to an entry. If the index is not found, discard a LRU entry and fetch the new entry associated to the miss index. Your browser won't be able to display all the entries so it could be safe to let the cache be updated for every entries inside a bigger hiden window with the displayed ones in the center.

Re: [MZ-SD²CMT / MZ-CH376] Ideas for fast loader/saver program without the need of GUI on the SD device

Posted: Sat Dec 15, 2018 8:08 am
by Pacman
EN:
The source will be available on github as soon as I have fixed the few remaining bugs.

The CH376 does not know how to organize the data in alphabetical order.
I have already used the method of indexing but it is very slow because you have to read the whole file. I will still try to optimize it.

Thank you.


FR:
La source sera disponible sur github dès que j'aurai réglé les quelques bugs restants.

Le CH376 ne sait pas organiser les données dans l'ordre alphabetique.
J'ai déjà utilisé la méthode de l'indexage mais c'est très lent car il faut lire l'ensemble du dossier. Je vais quand même essayer de l'optimiser.

Merci.

Re: [MZ-SD²CMT / MZ-CH376] Ideas for fast loader/saver program without the need of GUI on the SD device

Posted: Sat Apr 25, 2020 12:44 pm
by hlide
No progress so far?