General Assembly Question $4000 vs $0100

Page 1/2
| 2

By Chilly Willy

Expert (121)

Chilly Willy's picture

05-05-2022, 17:41

I think I have those numbers right.

I am working on some code that I am having difficulty with.

When the MSX starts up at $4010 is it possible to replace all the OS starting from $0000 then having it startup at $0100 like CPM? Or is the OS a permanently mapped rom.

Is it simply setup a a stack, some small amount of code then execute?

I am really having a difficult way of explaining it but I hope I am getting my question across.

Login or register to post comments

By MsxKun

Paragon (1141)

MsxKun's picture

05-05-2022, 18:01

If you boot from a ROM the BIOS is at $0000 yes, so it will be there unless you disable it. But then you'll need to manage the interruptions yourself. The BIOS does many things (handle VDP interrupts, keyboard buffer reading... ), the BIOS is your friend.
You can still have ROM code at $0000 on a 48kb or 64kb ROM, and still you can use the BIOS and your ROM code. Just switching between them with care.
Or have your interruption at $0038 on your ROM (once enabled the page 0), manage interrupts yourself, and still call the BIOS if needed, using InterSlot Calls. Or, much better, the other way: just have the BIOS on and call your ROM page 0 routines with those Interslot Calls.
Or you can use MSX-DOS (wich after all is CP/M compatible) and you have all the 64ks of RAM available for your code (almost, some space is reserved), and you still the BIOS totally doing the job for you.

Many ways. All depends on what are you trying to achieve.

By Grauw

Ascended (10859)

Grauw's picture

05-05-2022, 19:21

You can have a ROM with embedded DiskROM which loads from ROM as if it's a floppy disk. I forgot the name of the tool that generates it (dsk2rom or something?). Either way, because it embeds a DiskROM you can boot a COM file with the usual MSX-DOS memory layout.

By Timmy

Master (200)

Timmy's picture

06-05-2022, 00:21

Well, if you are going to enter MSXDev'22, for example, then it doesn't really matter where the code starts.

I mean, while MSX is just an umbrella name for many many kinds of computers using a similar operating system, you could still just target just one of these hundreds of computer models.

For example, you could just target that one japanese MSX computer brand with 8k RAM with that special keyboard. Then all you need is write the driver for that specific keyboard, and maybe the joystick, and perhaps the output to a printer, and perhaps a driver to that specific brand of disk drive, and a driver for the music chip, and then you're done. If you don't have any input or output, then you can skip all those drivers too!

Or if you want to support all the machines, then all you need to do is to write a detection routine for all the models and then write all the drivers for all these models and then you're all set!

Then again, for MSXDev'22, you only need to support one (obscure) MSX model (or emulator). At least, that's what I understand from the rules.

And if you have no need for RAM, you can use almost all 64K of ROM memory just for yourself too! You can even set up a stack within the 64K ROM to POP things. Of course you can't PUSH things because nothing can be overwritten, but that's not a big deal for someone like you.

Most people won't implement these ideas, but I like you being different, and you don't have to support every single model anyway for MSXDev'22.

Looking forward to your finished project. Smile

By Grauw

Ascended (10859)

Grauw's picture

06-05-2022, 01:00

Interesting way to read the rules, not sure if that is the intent Smile. I find it hard to believe you won’t get points docked for such unnecessary lack of compatibility. Though you’ll probably get a bonus point for creative interpretation of the rules.

Tho a game that uses pattern table mirroring so does not work on Toshiba VDPs would be more debatable. I can already see the controversy arising Smile.

By gdx

Enlighted (6603)

gdx's picture

06-05-2022, 02:55

If you use ROM disk you can't make a ROM supported by MSX with 8/16K RAM and you will need to use a ROM with mapper.

By Timmy

Master (200)

Timmy's picture

06-05-2022, 17:06

Grauw wrote:

Interesting way to read the rules, not sure if that is the intent Smile. I find it hard to believe you won’t get points docked for such unnecessary lack of compatibility. Though you’ll probably get a bonus point for creative interpretation of the rules.

Tho a game that uses pattern table mirroring so does not work on Toshiba VDPs would be more debatable. I can already see the controversy arising Smile.

Perhaps it's just me coming from the Spectrum community, but I've always found this position on MSX software so surprising. It's strange to hear that people could find it "unneccesary" just because some people want to target specific model(s) for this contest. The point of this year's contest is that you can choose whatever specific hardware you want to target, without people complaining about it.

If someone wants to target one specific model or hardware, that should be fine. If someone wants to use a MIDI keyboard to play a game, that's fine. If someone wants to make a game that works on his own MSX, that should be nice too. And if someone wants to target only TurboR, that should be celebrated as well. And if someone still wants to make an MSX1 entry this year, that should not be a problem either. Perhaps the ones that were disqualified last year could be re-entered again for this edition.

Making experimental games is a good thing, even for the MSX. I understand that over here many people would rather want established franchises that are already great on other platforms, and they are right that Spectrum Ports are really great. Perhaps the key there is that the Spectrum community have no problems with eccentric games or experimental ones, and therefore people don't mind releasing games on the Spectrum first. In this community, those developers would get the words "unneccesary", "controversy" or "debatable" instead.

Besides, they will all release a game for the MSX. They all finished a game! As someone who actually have had several entries in MSXDevs, I'd say finishing is the most important part. For example, don't spend too much time to make your game working with a 48K ROM, but make a smaller one that fits in 32K (or even smaller) that you can finish now.

(Sorry for off-topic.)

By ro

Scribe (5115)

ro's picture

07-05-2022, 12:00

Before we start guessing what you really need; what do you really need?

By you words, I think you need page 0 free at the moment you start you program? Are you asking if page 0 is always BIOS ROM? In case you do, the answer is no. After boot, you can swap it for RAM and have your program go to #0100 for example.

By gdx

Enlighted (6603)

gdx's picture

07-05-2022, 12:41

Timmy wrote:

If someone wants to make a game that works on his own MSX, that should be nice too.

I don't think the rule is that extreme. The rule means that you have to make an MSX compatible game with any extra hardware for MSX.

By thegeps

Paragon (1284)

thegeps's picture

09-05-2022, 00:15

And obviously, if you need RAM on page0, your game won't work.om 16/32K MSX1 machines (so, eventually, you won't be able to declare the game "compatible with all MSX, you will have to set minimum requirements)

By gdx

Enlighted (6603)

gdx's picture

09-05-2022, 03:01

Even in this case, he can obviously declare the game "compatible with all MSX" provided that he indicates the amount of RAM needed. What is important is to properly manage the slots for the game to work on any MSX with a memory expansion.

Page 1/2
| 2