MSX History: The Platform Microsoft Forgot
tedium.co
tedium.co
It was a really nice computer console with 2 cartridge slots which were most of the time occupied by a 5"1/4 floppy drive and sometimes a Data-corder [2][3] (to load software - games - off cassette tapes). It was fun to start loading the tape, then going to play in the garden for 30min-1h as it read the tape, just to come back and see that it had failed and then try again - and play more in the garden.
I also learned BASIC, some assembly which was required to add cheats to games before they loaded, and even used to do simple animations from basic geometric shapes.
[1] https://en.wikipedia.org/wiki/Gradiente_Expert [2] https://youtu.be/SZtkQp1mbQg?t=41 [3] http://files.datassette.org/tech/data_corder_dr1.pdf
Here are a couple other candidates (restricted to stuff that actually shipped as products):
* QuickPascal - Microsoft's low end Pascal competitor to Turbo Pascal. (The full MS Pascal might be a reasonable candidate too.)
* MS Access, the communications package. (Predates the database of the same name.)
* Softcard - Z80 coprocessor board for the Apple ][. (The Mach 10 and Mach 20 PC accelerator oards arn't bad choices either. The Mach 20 was a plug in board for PC's that itself had expansion slots.)
* Multiplan - the spreadsheet precursor to Excel.
* The runtime-only version of MS Windows. (Bundled with Excel to let people that didn't have Windows run Excel.)
* Visual BASIC _for DOS_ - Exactly what it sounds like, but running in text mode DOS.
https://www.cnbc.com/2017/11/29/the-lesson-melinda-gates-lea...
MS Xenix is another one that might ought to be on that list. So much of Microsoft's image is built around Windows that the notion of a Microsoft without Windows and selling a 'Unix' has got to be startling to the vast majority of folks.
Known as a failure, sure, but still well-known.
There are quite a few emulators available:
- fMSX is multiplatform: https://fms.komkon.org/fMSX/
- RuMSX: http://www.lexlechz.at/en/software/RuMSX.html
It's been a few years since I used any of them so can't vouch for quality.
For me, the thing that made MSX fail was over-standardisation - it was very difficult for manufacturers to stand out from the pack. Often, the machines all felt the same, so consumers would buy the machines on the basis of style - and there were some truly atrociously ugly MSX machines being designed in those days. (In some ways, its quite similar to the situation with, say, Android today.)
And then, there were the places where standardisation hadn't quite worked. Subtle differences between systems often mean that developers had to have a fleet of MSX machines to test on, to be sure. (Again: Android)
And in the midst of all of this, along comes IBM and the rest is history .. but for a while, MSX (and MSX2) were really intriguing technologies. Working on MSX in Japan led me to becoming an ITRON adherent, which led to me becoming a systems/OS developer.
https://en.wikipedia.org/wiki/TRON_project
.. which put me in the right place, at the right time, to become an early Linux adopter ..
I wish PC makers today would branch out from their "copy Apple" sterility.
There was some other interesting stuff in the 80s, like the systems from Apricot (formerly ACT). There was the Portable
http://s11.photobucket.com/user/ballsandy/media/Computer%20r... (uncropped at https://cs9.pikabu.ru/post_img/big/2016/10/15/5/147651790013... )
which also had voice recognition, or the Xen
http://www.1000bit.it/lista/a/act/apricot_xen-i.jpg
which had programmable keys and LCD screen on the keyboard.
This was an awesome computer, very fun to play with.
I did prefer the bass sounds on the Casio Phase Distortion synths though over the FM options as sounded richer (at least for me).
Picture a 8 year old boy unwrapping his first computer back in 1988. It would boot up right into MSX Basic (until later on when I added a floppy drive). One could play around with commands and have stuff happen. "screen 2" would take you to a graphics mode, where amazed me would get simple programs drawing stuff on the screen. I didn't know that I was 'programming' anything, only that I would type stuff and run and things would happen. I didn't understand what the 'for' instruction did, among others.
My first 'assignment' came from my father. He repaired TVs as a hobby(mostly, he did fix a few for money). One thing he couldn't do was to adjust the alignment on said TVs. There were pattern generator devices which cost quite a lot of money, money we didn't have (even the computer was second-hand).
So young me had set out to draw a greed. Easy - screen 2, then a bunch of 'line' instructions, one per grid line. Lots and lots of typing. Since the computer connected to TVs already (through a RF box), all my father needed to do was load the program (from a K7 tape) and hook up to TVs. That was great.
Revisiting the program a couple of months later (he wanted the grid spacing changed) and dreading to do that work, I was flipping over the manuals, when it suddently clicked: I could use a variable for the 'line' instructions, and change with this 'for' instruction, which so far had eluded me. A few 'pages' worth of code got translated into 4 lines.
I was hooked. Never stopped coding since then.
Another thing I tried to do. So PCs came around, with nice graphics (nicer than what I had, and it took a while but then they got nicer graphics than even MSX 2.0 or the Turbo-R). Then Windows 3.1 came around.
I tried to replicate Windows 3.1 based on magazine printouts - PCs were still hard to come by, PCs with enough specs to run 3.1 even harder still. At that time, I had switched from Basic to Turbo Pascal (3.0). The MSX port was lacking a few units. Most notably, the * graphics * unit (massive omission if you ask me).
So I set out to implement the drawing functions myself. Only I wasn't at the university yet, and didn't know how to draw lines (or god forbid, circles). A quick google search today will give you Bresenham's. Back then, information like that was hard to come by.
So I did some thinking. Even though I was booting up to DOS at this time – which meant that all pages were mapped to RAM – MSX Basic was still there in ROM. How did it do it? The functions must be there somewhere.
I got hold of the "MSX Red Book". That book described all ROM functions, even undocumented ones, with the memory address, input and output registers. Jackpot! Only problem was, as previously mentioned, all memory banks were switched to RAM. I would have to flip two banks to ROM, run the functions, and then switch back.
Then I found a function that did just that, CLPRIM I think it was called. In short order, I had ASM wrappers for most basic drawing functions, and I could draw my "windows".
Two problems remained: text, and the "mouse" (I had no mouse, I was faking with cursor keys).
Drawing text in graphical mode was far beyond my capabilities – specially since I wanted to squeeze 64 columns (ordinarily that computer would do 40 per line, in text mode, and the character patterns were designed for that). Then I remembered that I had WordStar. WordStar managed to get 64 columns. How?
After some digging I found that it would load a program into RAM before running the editor (PC-based DOS users would call these TSR's). So I 'stole' it. Before running my 'windows', I would load it too. Yay windows with titles! (Lots of work done afterward to ensure they would horizontally match and not overflow).
Good, now all that's left was the mouse. So I wrote a 'TSR' of my own, which would draw and move a hardware "sprite". The only thing the turbo pascal program would have to listen would be for the space bar, and then retrieve the 'mouse' position from a pre-arranged memory location. The asssembly code took a while to write - it was easy to lock the machine up - no memory protection or multi-processes meant that these were "hard" lock ups, which required a reset. Still, I eventually got it done.
Last major problem: both the wordstar TSR and mine required some of the same hooks. hooks were pre-determined memory locations. A 'call' – CD 21 – instruction would be issued to these locations whenever the event happened. Usually, they would contain 'C9' (RET). However, there was just enough space for, lets say, a (JMP) instruction (C3) plus memory address. This way, you could run your own code and then (RET) when done. So we both used the same hooks.
The way I got around this was: load the Wordstar one first, then load mine. If I found that there was anything there other than C9, that meant that the hook was in use. So I would save it, put my own in place. When finished, I would transfer control to the code that I had saved before.
Finally I had a working system. A few tweaks here and there – I had to save the current state of the graphics processor (VDP) ports whenever my 'mouse' program activated, otherwise it would corrupt the screen. But then it worked flawlessly, if a bit slow (ROM was much slower to access, something I did not know at the time).
12 year old me used this fancy and overengineered system... mostly as a menu to run games, icons and all. Very little 'serious' work was done.
It's too bad that there was no version control and almost none of the code survived (I may still have some of the 'TSR' code printed out, an earlier version). It would have made for a nice blog post.
I do miss some of that. There were very few abstraction layers between your program and the system, so you really understood what you were doing.
The downside is that I now have a few neurons which are forever locked to store now useless MSX trivia.
poke &HF346,1
call system
This exact same eureka moment happened to me as a kid when I picked up BASIC in first or second grade.
I was comparing two numbers to figure out which one is the larger one. I put my if statement, and the condition, but then turned out I had another number I had to compare to the larger of the first two. Once I wrote that, I realized I needed another one, and then another one. It struck me that I didn't even know how many numbers I was going to need to compare and it was clear to me that I cannot continue doing it this way.
I started to think what can I do, what if I compared the first one with the numbers after it in the list... Oh what happens on the last number? Do I wrap, no that doesn't make sense, because I did that comparison already.
I know what to do, I should compare each number with all the numbers after it, and pick the largest one from each iteration and place it elsewhere.
This is how I came up with my O(N^2) sorting implementation. Probably the first "general purpose" algorithm I've ever come up with or implemented but I remember the exact feeling of "wow, this changes things".
That realization that I could execute the same subroutine while changing the parameters it is operating on was literally an eye opener at that age and it was so satisfying having come up with it on my own.
After that I moved to programming BBS software in Pascal and C and more games and it slowed down the progress a lot; so slow that compiling process.
It improved a while later with Delphi but after that (C++, Java, C# etc, Haskell, etc) it all went down again; everything is still not really as accessible and fast to iterate as that Basic and Delphi experience. I think it was mainly because they both were a) very fast (interpreted and with Delphi, a very fast, almost instant compiler) and b) for me, closed loop; I had almost no access to other devs (only via BBS's) and that meant I had "The Book" for my environment and that was all there was to learn. So no code completion or spelonking 1000s of libs was needed, just use what you have and you could make anything. Ofcourse you theoretically could make anything; practically you were slow because you had to basically write a lot yourself that you can just pull from the internet now.
Edit: apparently this is done to change the subslot to make sure RAM will be mapped into 0000-7fff. All those words wouldn't have meant much to 12-year-old me, but I certainly knew I had to do that before loading games on my Mitsubishi ML-FX2.
https://www.youtube.com/watch?v=yVFL05xsdhk - part 1 https://www.youtube.com/watch?v=ISPb1sL72EQ - part 2
In hindsight, x86 (which was a shittier ISA) survived, but it shouldn't have been.
If we include RISC ISAs, what's surprising is that we're still dealing with CISC today. I'm hoping RISC-V will change that.
Edit: https://en.wikipedia.org/wiki/MSX-DOS lots of nice anecdotes there.
We had a HIT BIT Sony MSX.
In the late 1970's the hobby market existed with machines then being many and diverse. Almost all of them licensed Microsoft Basic. Only later with the home market and the likes of Commodore, Sinclair et al. did home computers come with their own versions of BASIC.
We all know that BASIC is a load of rubbish. But the MicroSoft BASIC on those hobby machines set the mood for what home computers would have, even if it was not MicroSoft's BASIC.
Early home computers did have custom ROMs for all kinds of exciting languages, on the BBC Micro you could get BCPL (C, early version), Forth and probably Pascal. Same on the Sinclair machines, there was even a ZX81 clone - the Jupiter Ace - that ran Forth.
Despite this plethora of languages we ended up with BASIC. Boring BASIC. There were no resource excuses, Microsoft had just set the tone of what the home computer market was to be.
Same problem happened with Windows. Instead of networked UNIX style computers with some security worked out with things like 'user space' there were this ugly DOS and Windows things and it was 'personal computing' with people carrying disks from one PC in the office to another. Although I liked Windows at the time it really was the second time round that Microsoft had stunted computing, first with BASIC and second time with Windows/DOS.
Coming from a BBC Micro background where the BASIC was awesome and the disk filing system was okayish I was massively underwhelmed when I first had to use DOS. I felt 'is this all there is' as I experienced the kludginess of it.
MSX made precisely zero impact in the UK other than giving the likes of Personal Computer World something to waste dead tree and ink about. From what I remember it was not that hacker friendly as back then you needed to write code that was familiar with the hardware, not abstracted out through some convenient operating system. With a BBC micro you knew that you could write something performant - as in arcade machine grade - with the built in assembler and a lot of work with the A/Y/X registers of the 6502. MSX on a 16 register Z80 with some mystery meat video interface made that possibility unattainable.
All considered I think MSX hampered the computer cause, promising something that was never delivered. It was also off in that blind alley of BASIC that MicroSoft foisted on the hobby market a decade earlier.
I don't think this is right - BASIC was quite well designed considering these machines' capabilities and projected use. The model of a BASIC-powered home computer was essentially that of a programmable calculator with "computer" features tacked on. You could start by PRINT-ing math expressions at the REPL, and these would give you the sort of result you would expect, using software floats. Then you could make more complex programs, using simple line numbers, variables, and a handful of reserved words like PRINT/?, INPUT, IF, GOTO, FOR. You also had PEEK, POKE, SYS and/or USR to access the hardware directly. Sure, in theory FORTH might have been more elegant, but its RPN-like approach was far from intuitive.
In fact, if you have experience with the C64 you can use the CDC without any documentation.
Those were my biggest issues trying to get back into it.
Also forgot depending on the BASIC that some BASICs only allowed 2 letter variables.
For those not familiar with these systems, the way you coped was usually by keeping a "data dictionary" on a sheet of paper.On a sheet of paper you'd have...
$AA = Name of foo
$AB = Selected color of baz
$AC = Blah blah
$AD = Length of qux
etc.It wasn't TOO bad. Until you lost the damn thing, or had to work on somebody else's code and you didn't have the data dictionary. You could keep the data dictionary in the code's comments, but on systems with just a few kilobytes of RAM (ie, the systems that restricted you to 2-char identifiers) this was not always a feasible luxury.
Luckily, I managed not to have to deal with this personally. All the BASIC environments I used as a kid in the 80s did not have this limitation. But I heard horror stories.
Some commercial Apple II software was actually written in BASIC, and you could read the code. It was usually fairly liberally commented. Example code in magazines was liberally commented as well. Folks didn't seem to comment individual lines of code, but tended to "name" and sometimes describe their GOSUB (subroutine) blocks.
But, Applesoft basic didn't force you to use two character variable names. Because most Apple II's on the market had a luxurious 64KB or 128KB of RAM, and none had less than 48KB.
I think it was a different story on systems with 4KB or perhaps 16KB of RAM. On those systems I bet you were often squeezing out every byte.
I also think some older languages (COBOL?) often had restrictions like this.
I wrote a simple BASIC interpreter recently in golang, and I'm amazed I had the patience to write "large" programs in BASIC in my youth with the limitations that were present.
what else did you have to do with your time? :)
i've had similar thoughts, but looking back, outside of gaming, the entire use of the computer, for me, was keying in programs. some were from others (in magazines/books), and some were learning to write my own. for the first few years of having one, i had no bbs connections, so... there was really nothing else to do except read books/magazines and type in programs.
My resulting programs tended to look like this:
10 FOR N=60000 TO 60000 + 20
20 READ A
30 POKE N,A
40 NEXT N
50 RANDOMIZE USR 60000
100 DATA 1,2,3,4,5,....
As you can imagine it was a tedious process. Most of my time was really spent trying to hack games for extra-lives, which I guess wasn't so unusual back in the day. Later I used the same skills to patch binaries to accept serial numbers - before I started writing real code in C, Java, Perl, etc, etc.I helped a restaurant that had their inventory, crew scheduling, payroll, and accounting all written in BASIC. Ran on a PC AT in the back office. It worked flawlessly.
Many of us have fond memories if BASIC, but let's face it, it was, well, quite basic (pun intended).
If you wanted low-level access you just poked Assembly code
Most of the really early Home Pc's had such limited hardware that running a compiler was not practical - you could get compilers for CPM systems but they where more professional systems with a price tag to match.
Even than a top of the line Cromecho s100 was a lot cheaper than say a pdp11/03
For a specific example, just look at the syntax for drawing primitives like PSET, LINE or CIRCLE. Something like this is neither particularly discoverable, nor consistent with the normal function call syntax in the language:
LINE (0, 0) - (100, 100), 2, FB
(I wonder how many people with BASIC experience from that era remember what "FB" means here.)I'm not persuaded by "discoverable"; you'd get a book that included a page for every statement with a worked example.
It also throws you off once you learn about subprograms (in dialects that had them), and realize that all this stuff is almost but not quite like them - and all the differences are there for no good reason.
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
I never got to own a Jupiter Ace or to have a go at FORTH. I don't think the options were 'BASIC or FORTH', neither do I think that computers had to have 4K of ROM and 1K of RAM by the time the 8 bit microprocessors came along in the hobby era. Sure 8K of anything cost more than a paltry 4K but were those machines with 4K ROM of BASIC and 1K of RAM useful for anything whatsoever?
The ZX81 with 1K just mentally mutilated programmers, other than that you learned that you needed more memory.
Your first programming language constrains how you think, I was deeply wedded to the 'GOTO' concept and could not understand how a program could work without line numbers. BASIC took me a long way off the object-oriented paradigm!
Anyway, thanks for grumbling about my sweeping statement - that I still stand by - I have now found some Dijkstra that is totally relevant to today and how web development has gone:
Your first programming language constrains how you
think, I was deeply wedded to the 'GOTO' concept
and could not understand how a program could work
without line numbers. BASIC took me a long way off
the object-oriented paradigm!
Maybe! This wasn't the case for me. I'm no genius programmer, but going from BASIC to Pascal was very, very natural for me and it was a welcome change because even as a high schooler it was obvious that BASIC programs quickly became unmanageable.Recently though I have struggled a bit in my brief encounters with functional languages, though, thanks to so many years of OO. But I got the sense that if I spent some time with it, I'd get it.
Claiming that learning BASIC as the first language somehow permanently broke they way I think about programming is bullshit.
I learned the ropes on BASIC in the 80s as well and it was a fine introduction to programming as a practical task but e.g. is in no way any kind of preparation to understand theoretical computer science topics like algorithm verification and provably correct programs. They're different worlds and that's really all he was saying. He'd get students come into his classes who thought they already knew all about programming and hit a brick wall when they had to deal with the level of analytical rigour his classes required.
I hit this problem myself when I try to learn functional programming. I've had a go at Haskell a few times and got nowhere. I had a similar problem getting my head around object oriented programming. Switching theoretical domains can be a significant issue.
Calling it bullshit is actually being far too polite about it.
I call bullshit on that. A whole generation of programmers started with BASIC and went on to different languages. I went from BASIC to Pascal and had no problem at all going from GOTO to structured programming, but I did miss the REPL of BASIC.
Btw. if BASIC cripples your mind, then so would Assembler, which is presumably how how Dijkstras generation got their start.
Honestly I think it was just snobbishness. BASIC was available on cheep microcomputers which was affordable for regular people and hobbyists, as opposed to the machines and languages only available for businesses and academics.