News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: MSX : How to do a input "space" in machine langage  (Read 1120 times)

Hacker65xx

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
MSX : How to do a input "space" in machine langage
« on: April 04, 2020, 10:48:17 pm »
Hi

On MSX , how to do a input "space" in machine langage , no "assembly" but direct in hexadécimale code
« Last Edit: April 04, 2020, 11:21:55 pm by Hacker65xx »

FAST6191

  • Hero Member
  • *****
  • Posts: 2895
    • View Profile
Re: MSX : How to do a input "space" in machine langage
« Reply #1 on: April 05, 2020, 04:24:13 pm »
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
http://map.grauw.nl/resources/msxsystemvars.php ( http://map.grauw.nl/resources/ 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.

Hacker65xx

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: MSX : How to do a input "space" in machine langage
« Reply #2 on: April 05, 2020, 04:47:32 pm »
Hi

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)