11 March 2016 - Forum Rules

Main Menu

MSX : How to do a input "space" in machine langage

Started by Hacker65xx, April 04, 2020, 10:48:17 PM

Previous topic - Next topic



On MSX , how to do a input "space" in machine langage , no "assembly" but direct in hexadécimale code


I don't know how many around here are familiar with the MSX -- it was not a popular system in the English speaking world and has not seen any kind of resurgence in recent years compared to even the likes of the PCE/TG16.

Still ( in generally looking like a great collection of info, I also grabbed the pdf of "MSX Technical Data Book" from there)
Space is an interesting thing in this as it has a listing in both the TRGFLG located at #F3E8 and presumably also has something under the standard keyboard write and character buffer. Said keyboard also has a few options for input methods so that could also be fun if it uses ideographic space instead.
I don't know what in that is read only and what is read-write -- it calls it ROM space and the hardware docs covering all sorts of quirks make no mention of it being read-write so I will assume it is read only. You might also be able to play with the buffer and shove a space command into it.

Beyond that in general programming we went to see people copy key states to memory and act upon those. Looks like the hardware handles that here though (certainly has a repeat rate available for setting) so you might be spared having to find whatever you want for your given game.

What do you aim to do here? My usual guesses for a question like that is some kind of arcade cabinet where you only give access to the mouse (or maybe want a coin-op to a coin switch or something), not wanting to have to get up and smash space when starting a game, some kind of disability workaround or some kind of turbo fire/alt fire option.
Such aims might vary your approach. Most times though you don't just insert a phantom key press into code as much as force whatever is looking for the key press to return the result you want, be it by looking in a different place for another key/button/whatever, forcing a jump at the end of the code or by returning the value you want automatically.
The multiple means of pressing space (and seemingly only space) might also change things -- assuming you can find the key press stack/buffer you might well be able to put as many as you like but if the code is waiting instead for TRGFLG to flip (or go low as the case may be... heh, don't think I have encountered negative edge logic in ROM hacking before) you are not going to get anywhere.



I want make a standalone version of the games in "disc station" (it's a japanese magazine disk for msx with good games in disk)