Hacker News new | past | comments | ask | show | jobs | submit login
WebMSX – Online MSX Emulator (webmsx.org)
51 points by ppeccin on Sept 24, 2015 | hide | past | favorite | 19 comments



I'm really impressed at the responsiveness of this implementation. HTML5 terminals I've seen seem more sluggish even though they are similarly simple (though I guess that's partly the round trip latency at work, as well, and I guess this is all implemented in the client).

I always wanted an MSX when I was a kid and collecting 8 bit computers (this was when 8 bit computers were still somewhat useful; I bought, fixed, and sold them for spare cash and would keep the most interesting ones). I had almost everything I read about in magazines come across my radar during those several years, including ridiculous stuff like an Apple Lisa with several hard disks, a TRS80 with every imaginable expansion (including the big expansion backplane case), a Coleco Adam, and more Commodore machines than you can shake a stick at.

But, alas, MSX just wasn't common in the US, and I never found one.


Is there a way to get a nice output of the famous "10 PRINT CHR$(205.5+RND(1)); : GOTO 10" on this?


If like me you haven't seen that code before: https://www.youtube.com/watch?v=m9joBLOZVEo


I've never even seen an MSX before, but I was big into the C64 and those early BASIC machines have a lot in common, so I decided to give it a try just for you.

Turns out you can, with the caveat that you it won't look quite right unless you enter "SCREEN 1" first:

  10 PRINT CHR$(1)CHR$(93.5+RND(1));: GOTO 10
The differences (assuming that you understand the original C64 statement, because I suspect no one but andersonfreitas will ever read this now that it's dropped off the front page):

* The "SCREEN 1" statement puts the display into the second text mode, which has 32 columns and 8x8 characters. The default text mode is 40 columns and 6x8 characters, truncating the rightmost quarter of each character. All of the non-graphical characters are squeezed into the first six columns, so the default mode has no downside unless you want to use graphical characters.

* The diagonal line characters are at points 29 and 30 in the international (i.e. non-Japanese) version of the MSX character code table (see http://www.tabalabs.com.br/msx/msx_tech_hb/msxtech_tabalabs...., page 317 (page)/320 (PDF)). However, the first 32 character values are normally interpreted as control codes instead of printable characters. To actually print those 32 graphical characters, you need to precede each one with control character 1, followed by character (desired character value + 64). So if you want character 29, you PRINT CHR$(1)CHR$(93). (BTW, the characters past 95 appear to print the same with or without a proceeding CHR$(1). I dunno.)

Unlike the C64, the MSX also has a pair of triple-diagonal characters, so you can make a denser maze like this:

  10 PRINT CHR$(203.5+RND(1));: GOTO 10
Or you can combine both and make a weird mixed-density maze like this:

  10 PRINT CHR$(1)CHR$(93.5+RND(1)+INT(2*RND(1))*110);: GOTO 10
I'm particularly proud of that last one. See what I did there? :)


Thank you for the explanation! The second version is really cool!

I've never used an MSX or C64 before, but since I'm interested in generative art, I've became curious about these program when a book with the same title was released:

http://www.amazon.com/10-PRINT-CHR-205-5-RND/dp/0262526743/


Would a 2-lines nibbles game be better?

I've just typed the implementation by Ricardo Bittencourt (http://www.ricbit.com/mundobizarro/twoliners/) and it works. BGM included: https://imgur.com/a/PnE0s


I wasn't aware of those two liners, impressive btw.


We used to do development on various MSX machines (we were doing implementations of Logo). The machines were never designed to work in low-humidity environments (winter time in Montreal). Once I accidentally zapped four machines while attaching an emulator board. We had sets of all the custom chips shipped in from Japan, and I spent four days with the VP R&D fixing them. We got three of them to work eventually (there were no spares of the computers as they were prototypes and in short supply). Fun times.


Nice work, if it can ever handle MSX-2 and higher it'll be able to play some amazing stuff.


Really nice work!!! I'm really nostalgic here showing the computer I learned to program when I was 10!! Thanks!! Again, really nice work!!


One of the fondest MSX games I've played when I was a kid were "Cannon Fighter" and "Panic Junction". Though I haven't seen the latter, someone rebuilt the former in Flash: http://www.silvergames.com/cannon-fighter


Ok, so how do you send Ctrl-Break (or the equivalent)?

Tried to do a loop that breaks automatically but there might have been a bug


The "STOP" MSX key is mapped to the Pause/Break key on the PC


Looks like Pause/Break pauses a running program, and Ctrl-Pause/Break aborts it. (From the perspective of a non-MSX user.)


Then I'm SOL since I'm on a MacBook (and the googled solutions didn't work)


Also to the Scroll Lock key


Wow. It actually feels more responsive than Terminal does!


Read this as "Online OSX Emulator". Was mildly surprised.


MSX FTW!!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: