MSX for Dummies: Working with files with Native Basic 1.0, SD, Nextor, Sofarun

By Soft Automaton

Resident (51)

Soft Automaton's picture

07-04-2022, 03:31

Hi everyone,
100% n00b question. It will be just one of many, I'm sure Big smile

I have a CX5M (MSX1) and one SD Megamapper/Megaram 512 from fractal2000 with 2x 4GB SD. SD1 has Nextor and Sofarun on it. SD2 is formatted to FAT and can be seen but is empty. I also have a few original 4K Yamaha and Sony Memory Cartridges.

I want to start learning how to code on it. I'm brand new to both Basic and Assembly. I'm don't know any of the commands to interact between the computer and these SD cards.

  • In one scenario I want to write some code on the stock Basic 1.0 on the CX5 and save it onto either SD1 or SD2. Is it possible to save to SD in this manner and if so, how do I do this?
  • On the other scenario the SD Cartridge normally boots to Sofarun. Can I create a file from scratch in this environment to write in some code and save it (presumably as a BAS file)? If so, how is this done?
  • In a third scenario I have jumped out of Sofarun after boot and am navigating the two SDs in Nextor. Can I create a file from scratch in this environment save it (presumably as a BAS file)? If so, how is this done?
  • Can I also access the space on the CX from Nextor or is that somewhat pointless given how much room is on the two SDs?
  • Eventually I may want to commit something to the original cartridge. I have the CA-01 adapter to add one of these 4K cartridges alongside the 512. What is the command to save to it from any of these environments?

Lots of questions but I haven't found any of these answers anywhere so far. Each doc I have found skips over all this stuff, it seems. What direction do all of you usually take?

Login or register to post comments

By Manuel

Ascended (18880)

Manuel's picture

07-04-2022, 07:45

Some quick hints: from Sofarun you can always exit to Nextor. And from Nextor you can always exit to basic, using the command basic. And then you get a full screen editor where you can save your program to the current directory with: save"myprog.bas".

By Soft Automaton

Resident (51)

Soft Automaton's picture

07-04-2022, 18:11

Thanks @Manuel!

I had some success with those very steps last night as I was posting (Nextor > Load Basic off SD > Save). I note that couldn't save to B, the second SD. I'm not sure why. Saving to A worked. Why does it not like B?

However, do you or other members mind elaborating? A "Yes it's possible, here's how" / "No this is not possible" answer would be ideal.

The reason I'm asking about all these scenarios is because I don't want to pursue an option that simply doesn't exist. My preference would be to write using native onboard Basic but my only save option is SD (or, on a rare occasion, maybe 4K Memory Cartridge). Also, I can't find a simple answer to any of these questions so I crafted this with the hope that these answers can be contained in one place for others to benefit.

By Manuel

Ascended (18880)

Manuel's picture

07-04-2022, 21:18

Let me get some things a bit clearer for you.
1. Any MSX, like yours, normally boots to MSX-BASIC. This is the full screen editor where you can give direct commands (like the save command) or write program in BASIC. MSX-BASIC is built-in the MSX, in the ROM.
2. When you use a disk drive in any form (including the SD card stuff), you need an extension ROM for that to implement routines to use the disk drive. In your case, this is the Nextor "ROM" that is part of your SD Mapper cartridge.
3. When you go to MSX-BASIC with the SD Mapper cartridge in the MSX, you will see also "Nextor BASIC". That is the message that the BASIC extension to use disk drive functions is present in the system. In older systems it will say "Disk BASIC".
4. Nextor (or on older systems: MSX-DOS 2) can load a MS-DOS like operating system ("MSX-DOS 2") off the SD-card. You can use commands very similar to MS-DOS there, if that tells you anything. Possibly, you have an AUTOEXEC.BAT file on the first partition of your SD card that starts (from Nextor/MSX-DOS2) another program like Sofarun. As you noticed, you can always exit Sofarun to get back on the Nextor command line.
5. From that MSX-DOS2 environment, you can also tell the system to exit to MSX-BASIC again, that's what the BASIC command does.
6. From that command line, like in MS-DOS, you can change the current drive with the drive name plus :, so try: B: to switch to the B-drive (which is either another partition on the same SD card, or the first partition on the other SD card). Try DIR to see which files are there.
7. The same drives also exist in the BASIC environment. But there you can only control things using MSX-BASIC commands. If you want to save to drive B:, just try: SAVE"B:MYPROG.BAS". If that doesn't work, let us know what the exact error message was, otherwise it is very hard to help you.
8. Changing the current drive goes with _CHDRV("B:") for instance.

About the 4k Memory Cartridge: you can put some tiny programs on it. But I don't think it's very practical. Especially as you have such a great alternative.

By Nemoide

Supporter (4)

Nemoide's picture

03-05-2022, 02:45

Greetings; I have my own newbie question as I'm freshly entering the world of MSX and am not sure if it warrants creating a thread.
I have a MSX1 (American Yamaha CX5MII/128) and am trying to figure out how to load ROMs off a 4GB compact flash card using a Carnivore 2.

From what I can tell, the first step is to put the card into the Carnivore 2, boot it up, run fdisk and create a partition.
However, when I try to do this, I get a screen saying "Nextor disk partitioning tool" with a series of dashes along the top and bottom and then... nothing. I'm under the impression that I'm supposed to see some sort of menu to let me create a partition, but I don't see anything. Surely it doesn't take more than a couple minutes to load whatever it's supposed to load, right?

Has anyone encountered this problem before or am I just not used to the MSX way of doing things? Any advice is appreciated!

By Manuel

Ascended (18880)

Manuel's picture

03-05-2022, 09:01

You are correct. Are you able to try a bit with some other CF cards?
Which version of the Carnivore 2 firmware are you using?

By Nemoide

Supporter (4)

Nemoide's picture

03-05-2022, 17:03

I only have the one CF right now, but I just ordered one off ebay that's on the compatibility list (as opposed to my Verbatim card that isn't there one way or the other), so that might be all what I need to get it working. The Carnivore 2 is running 2.40 firmware, so I doubt that could be the source of the problem.

By Manuel

Ascended (18880)

Manuel's picture

03-05-2022, 18:39

I also use 2.40 still (2.50 just got released) and I am using an ATP card successfully. 7 euros for 4GB, what a price Smile

By Nemoide

Supporter (4)

Nemoide's picture

11-05-2022, 17:03

Okay, so before all I would see was this:

But now I got a new CF card, formatted it as FAT16 with my Windows machine, and while I'll sometimes see that blank Nextor screen, I *sometimes* get some garbled nonsense that looks like this:

Is this anything anyone's seen before? I'm not sure if it could be a problem with the MSX, the Carnivore2, or the CF card. My MSX doesn't *always* reliably turn on but has had its capacitors replaced and seems to run BASIC just fine and I can boot both normal game cartridges and preloaded games on the Carnivore2 without any problems AFAIK. Another odd thing is that the first time I boot into Carnivore2 menu and hit ESC, it just goes into normal MSX BASIC instead of Nextor and I can't call FDISK - but if I reset the computer and try again, it seems to load correctly.
Are there any built-in diagnostic tools in either the MSX or Carnivore2?

Because I'm a maniac, I'm actually planning on getting an MSX2 computer from Japan soon, so if it's a problem with the computer, I guess I'll be able to work around that pretty quickly... I'll share any updates.

By Manuel

Ascended (18880)

Manuel's picture

11-05-2022, 22:12

There is no need to format it on the PC.

Quote:

Another odd thing is that the first time I boot into Carnivore2 menu and hit ESC, it just goes into normal MSX BASIC instead of Nextor and I can't call FDISK - but if I reset the computer and try again, it seems to load correctly.

You probably need to enable the 'double reset' feature in the Carnivore 2 configuration (via the menu). It can happen that the MSX boots faster than the FPGA inside the Carnivore 2.

As for the garbled text: no idea... As you already stated, for some reason things are going wrong... but I am not expert enough to tell you how to diagnose it. Perhaps @Alexey can help?