MSX WiFi via RS232?

Страница 2/4
1 | | 3 | 4

By ducasp

Paladin (712)

Аватар пользователя ducasp

21-02-2020, 16:51

Face

dmr wrote:
ducasp wrote:

[..] The best way I've found out to make it work properly with a MSX was to have a custom firmware made for it using Arduino IDE with ESP8266 support.

Yes, Arduino firmware can do the trick. However, I use NodeMCU firmware. This allows me to update new versions of the lua-code to the esp via wifi and NodeMCU allows easy event-driven programming. I have now a simple HTTP-server, a telnet server and a UDP "server" running simultaneously on the ESP (each in different Lua-scripts, optionally triggered during startup) as well as a serial-server to communicate with the MSX.

The HTTP server is used to configure wifi remotely via "http name_of_esp/config.html", and store the config on the flash of the ESP. The telnet server is used to transfer Lua-code to the ESP (and this can also be used to upload new wifi.cfg, which is a simple textfile).

Apart from the getip.com and getmask.com I have yet to add more commands to make it more useful (but that is just a matter of time Hannibal )

If you aren't seeking UNAPI compatibility and intend to create programs seems fine, I've started SM-X network driver like this and soon realized that UNAPI was the way to go as it has lots of tools and programs already working for it. Smile It is great to see old hardware being rejuvenated to get cool new functionality Cool

By dmr

Ambassador (0)

Аватар пользователя dmr

21-02-2020, 17:35

You may be right: UNAPI might be a next step. For now it seems overkill to me (excuse my French ;-) ) as my poor-man's wifi interface requires the MSX only to send some commands to the ESP where the ESP is doing all the work and sends results back to the MSX...

... and imho there aren't that many useful commands in MSX-DOS for this old MSX system (albeit a wonderful system ;-) ).

- get or set ip, mask, wifi-stuff
- get_dns "hostname"
- get "file" from "host" (via FTP or HTTP) and save or execute
- post "file" to "host" (via FTP or HTTP)
- telnet "hostname"

And what these commands do exactly is defined in the ESP, where the heavy stuff will be done.

... hmmm, I can imagine some multiplayer MSX RPG game via Internet Big smile

By dmr

Ambassador (0)

Аватар пользователя dmr

24-02-2020, 23:30

Update: I have now working:

- getip
- getmask
- whois

See example screenshot:

... maybe in the future someone can help me with UNAPI?

By ducasp

Paladin (712)

Аватар пользователя ducasp

25-02-2020, 00:50

https://github.com/ducasp/MSX-Development/tree/master/MSX-SM...

When I first tried it for SM-X, I've tried using the AT firmware, but you would need an ESP with more than 1M flash or use loboris AT firmware as it depends on the latest espressif firmware base and espressif didn't make a 1MB version of it. It is pretty much usable but also has quite a few bugs...

If you decide to go with a custom firmware, just implement the whole UNAPI in the ESP and use a simple driver that does not have to worry about buffers, too much commands, etc.... Again, this is the code for SM-X WiFi driver, I'm no MSX RS232 expert but I guess it would need a bit of work to get it to work with it as the SM-X rs232 is just two io ports and not memory mapped, but this should help quite a lot:

https://github.com/ducasp/MSX-Development/tree/master/MSX-SM...

P. S.: the driver avoids using functions to send / receive data as it is sitting on a 16KB memory mapper block, so it makes no sense to wast cycles on call / jumps, so lots of direct in/out instructions, not pretty but works pretty fast (SM-X serial interface speed is near 1Mbps so every cycle count)

About the custom ESP8266 firmware itself, at this moment I don't feel like releasing the code freely, as I wouldn't like to see hard work being used for someone profits, but it shouldn't be difficult and would be glad to help on any questions you have on your own development ;)

By dmr

Ambassador (0)

Аватар пользователя dmr

25-02-2020, 21:17

I have published all code on Github, plus a short description:

github.com/dromorobo/MSX-wifi

... please note: it works, but is an early stage project.

Please let me know what you think of it.

By bitsofbas

Resident (57)

Аватар пользователя bitsofbas

25-02-2020, 22:51

That's excellent! I'm not good at electronics, but I'm going to try and follow along with my MT-TELCOM II. Should work too, right? I've ordered the wifi module (which should take a couple of weeks to get here) and in the meantime I'll keep an eye on this thread and your github. Thanks for posting this!

By dmr

Ambassador (0)

Аватар пользователя dmr

26-02-2020, 08:20

Thanks! That's good to hear.

Please note that you need additional hardware - just a few euro's worth - for flashing the ESP with NodeMCU firmware and loading lua files. This can be either a USB-to-serial-TTL adapter with some 'jump-wires' or an "esp8266-01 Programmer" (*). The "esp8266-01 Programmer is more robust and easier to use (I have two of them, one rewired for flashing and one to load files). And you need a 5V-3.3V adapter board (**) to connect the ESP to your modem.

You may want to read the NodeMCU Documentation (while waiting for the hardware to arrive;-) ):
NodeMCU Documentation

I will update the readme accordingly.

(*) ESP8266-01 Programmer (Dutch website, just as an example):
ESP8266-01 Programmer
(**) 5V - 3.3V adapter board (an example):
5V - 3.3V adapter board

By bitsofbas

Resident (57)

Аватар пользователя bitsofbas

26-02-2020, 10:28

Yup, I ordered both the ESP and the adapter. Also got one of those USB-to-serial adapters lying around from when I put FlashFloppy on my Gotek. And I've got the MT-Telcom II. I think I've got all the hardware.

Let's bring those old modems back to life! ;-)

By dmr

Ambassador (0)

Аватар пользователя dmr

29-02-2020, 15:48

It seems that there is no Fossil driver for MT Telcom. Although based on the 8251/8253 this modem does not comply with the RS232 MSX standard. It uses different ports (00-07) but it also uses them differently.

... the ESP can be reached via _COMINI / _COMTERM in BASIC or some other terminal program, but this is less useful (for now it doesn't matter as I have not finished implementing the useful stuff like "filetransfer" and "remote login").

By Manuel

Ascended (19678)

Аватар пользователя Manuel

29-02-2020, 18:04

The MT-Telcom was very popular in the Netherlands. Would be nice if it could be used for something good.

Страница 2/4
1 | | 3 | 4