Recently I received the MSX Ethernet Cartridge from the Brazilian group Tecnobytes. This batch is already sold out, so for these of you who bought one, here’s a review of the unit and what you can do with it. The cartridge is useless without software, so I’m also explaining the InterNestor Lite TCP/IP stack and its companion suite of network applications, both developed by Néstor Soriano (Konamiman).
The review is long, so it’s split in two posts.
This is a Konami-sized cartridge with a single Ethernet port to the right and a couple of LEDs: the amber one indicates that the cartridge is powered on, and the green one indicates that there’s an Ethernet link established. It flashes during data transmission.
The Ethernet controler is a Realtek RTL8019AS, which means that the maximum speed is 10Mbps in full-duplex. This may not sound very impressive nowadays, but it is more than enough for the MSX, as we will see later. The design is based on Daniel Berdugo’s ObsoNET board.Read more ›
Yep, my MSX turbo R at home is now connected to the Internet and acting as an FTP server. It is connected to my home network using the Tecnobytes Ethernet Cartridge and running Konamiman’s ObsoFTP server over his Internestor Lite TCP/IP stack.
Feel free to play with it if you want to do some testing. It’s serving an almost empty 32MB partition on my B: disk (a CF card).
Read more ›
URL: ftp://therazane.lavandeira.net/ (any user name and password will work) Edit: the server is offline now, but read below for a couple of interesting updates…
In the early-mid 80s Microsoft created Multiplan, a spreadsheet application available for several 8-bit platforms such as the Commodore 64, the Apple II, and the CP/M operating system. This is the application that preceded Excel.
I knew that Microsoft partnered with ASCII Corporation to release an MSX-only version, called MSX-PLAN and available as a ROM cartridge. However, I had never seen the actual cartridge and was unable to find a dump of the ROM online anywhere.
Until now.Read more ›
In the last post we learnt how to use comparisons in C. This time we’ll see some properties of the comparison operators and also how to test on more complex conditions.
Structure of conditional statements: comparison values
Until now we’ve only seen conditional statements that use the relational operators that we saw in the previous post. However, in adition to these relational operators we can use almost anything as the condition. For example, the code below shows how to test a condition elegantly:
In this example, whether the puts() statement will run or not depends on the value of whatever is inside the parentheses following the if keyword:
- If the value inside the parentheses is zero, the condition is false and the puts() does not run
- If the value inside the parentheses is anything other than zero then the condition is true and the puts() statement runs
Because of this, the code above will not do anything if the variable error contains a zero, and it will print the message “Something bad happened.” if it contains any non-zero value.Read more ›
Wow, it’s been already almost 30 posts of the Relearning MSX series. Thanks so much for your encouragement and nice comments! And especial thanks to the supporters who are making this possible.
I think this is a good time to see what’s going to come in the future posts. The remaining subjects covering MSX-C are these:
- Other control structures (break, continue, case…)
- Handling numeric values with printf()
- How values are stored in the MSX memory
- Formatted output with printf()
- Screen control characters
- Escape sequences
- Graphical characters
- Functions (2-3 chapters)
- Storage classes and scope of variables
- Pointers (2-3 chapters)
- String arrays
- Structured data and creating types (1-2 chapters)
- Creating and reading files (2-3 chapters)
- Essential library functions (3-5 chapters)
This will keep us busy for about 25-30 more chapters and the schedule is well defined already. After completing these we’ll have a pretty solid base of the C language to tackle what’s coming next: the fun stuff, the MSX-especific subjects.
In no particular order:
- The MSX graphic modes
- Organization of the video memory
- Game control: cursor keys, triggers, joystick, mouse
- Slots and subslots
- Memory mappers
- Sound effects
- Playing music
- BIOS routines
- System work area and variables
All these subjects will come from the several books I have here:
- MSX2 Technical Handbook
- MSX turbo R Technical Handbook
- MSX-Datapack I, II and III
- …and others
There’s no schedule decided for these yet. We’ll talk about these subjects in the order we need them, so if there’s anything you’d like to see covered, don’t wait and just ask for it!
And now the important part: please support these posts with a small donation, because I write during my free time and sometimes other priorities take precedence. Increasing the amount of donations increases the priority of writing these articles.
Thanks for your support!
We’ve seen already how to read from the keyboard, perform some basic operations, and print results on the screen. This may be enough for a few very especific situations, but even the simplest programs will at some point need to take decisions based on the value of a certain variable. This is where conditional statements come in.
The smallest component of a program: statements
Before I explain conditional statements we need to understand what a statement is. To put it simply, a statement in C is a piece of code that performs an operation. So far we’ve seen two types of statements:
- Assignment statements (assigning a value to a variable):
i = 1234;
c = 'a';
c = getch();
- Calls to functions (performing an operation by calling a single function):
Note something very important: all of these end in a semicolon (;). While not technically correct, we could think of the semicolon as part of the statement.
These two types of statements are essential. We can’t write useful programs without them. However, they are not enough. We can’t code useful programs with just these two either. We need something else: conditional statements and loops.Read more ›
In the previous two posts we learnt how to operate with values stored inside variables in our program.
This time we’re going to see how to read characters and text strings from the keyboard in MSX-C.
Reading a single key press: getch()
MSX-C comes with a few functions to read a single character from the keyboard, but probably the easiest to understand is getch(). Let’s see an example:Read more ›
The cartridge is very well built. It has a single Ethernet port mounted on the right side of the case, with two status LEDs next to it: one for power and another for link/operation.
The Ethernet controller supports only 10 mbps links, but that’s not a problem because the TCP/IP stack can only reach a theoretical 30 KB/s transfer speed tops. According to Konamiman, this is because Internestor Lite sends and receives a single 512 byte packet per interrupt, or every 1/60 of a second. In practice, during my tests the average speed I saw was about 8 KB/s when downloading a file from an FTP server.
Konamiman has developed several applications that work with his TCP/IP stack. They’re available in his home page. Among these there are:
- An FTP client, to transfer files from servers on the Internet
- An NTP client to synchronize the clock of your MSX with an Internet server
- A basic telnet client
- A text-based Twitter client
- A Dropbox client
- FTP and SMB servers, to share the files hosted in your MSX
Hopefully we’ll see support for this board in the openMSX emulator in order to do some development.
In the previous post we saw a couple of variable types and the basic arithmetic operators. Today we’ll complete this part by taking a look at the bitwise operators and seeing a couple of characteristics of the char type.
Bitwise arithmetic operators
You may be aware already that computers store all data internally in binary. This is also the case with all the data types in MSX-C. As an example, the table below shows how some integer values are represented internally in the MSX computer memory:
The computer always works in binary, but in most cases we don’t care how MSX-C stores data internally because the compiler handles these details for us. However, there are situations when working with binary data makes sense, as in the case of working with graphics or programming hardware devices.Read more ›
In the previous post we saw how to print text and numbers on the screen. This time we’ll learn how to use variables and how to operate with them.
You probably know already what a variable is. It’s just some place in the computer memory that we use to store a piece of data. In C, a variable can contain data of one of several basic types. Let’s take a look at them.
Character variables – the char type
We have already seen this type in some of the examples in previous posts. The program below assigns the character ‘X’ to the character variable c and prints it to the screen using putchar():Read more ›