From X-Basic to ROM?

Страница 2/4
1 | | 3 | 4

By Dolphin101546015

Champion (335)

Аватар пользователя Dolphin101546015

17-06-2020, 11:16

Daemos wrote:

Will incbinning the compiled code together with the xbasic rom not be easier. You can then add any ml to your rom too.

Where you hope get compilled BASIC code first?

By Pineapple

Rookie (28)

Аватар пользователя Pineapple

25-06-2020, 02:42

Quote:

The procedure is simple. You have to create a Rom (8000h-BFFFh) with your Basic program, for example like as this:
https://www.msx.org/forum/msx-talk/development/convert-a-pro...
And then add the X-Basic Rom in front (4000h-7FFFh) by copy/past with a Hexa editor.

This will make you a 32K Rom with two headers. This should work without problems if you don't create too many variables and compiled code.

I can make a ROM from a basic file like in the link you provided, but I can't seem to figure out how to make the combined ROM work.

I saved my basic file as a ROM, then hex edited the first line and padded it to 16k.
This worked fine, but was slow (as expected)

Then I took the xbasic.rom file and pasted my 16k rom to the end, which made a 32k ROM.
This ran, but was still slow (like in regular basic)

I must be doing something wrong, and I don't understand the 8000h-BFFFh range that you mention, as this is beyond 32k.

Thanks for the help.

By gdx

Enlighted (4818)

Аватар пользователя gdx

25-06-2020, 02:49

Use CALL TURBO ON/OFF to speed up what you want in the program.

By Pineapple

Rookie (28)

Аватар пользователя Pineapple

25-06-2020, 05:57

Thanks.
Now I need to figure out why I get an out of memory error when I run the rom...

By gdx

Enlighted (4818)

Аватар пользователя gdx

26-06-2020, 02:35

Daemos wrote:

Ask kai magazine. I believe all his roms are xbasic. Although it could something else. Just ask.

Kai magazine probably uses the version in binary file.
http://www.msx.org/downloads/utilities/miscellaneous/x-basic...
To use this version you have to make your game on a DSK image and convert it to Rom with ROM2DSK.

By Pineapple

Rookie (28)

Аватар пользователя Pineapple

20-07-2020, 04:48

I have my game pretty much done, but there seems to be a weird "out of memory" issue when I run the rom on some MSX2 machines.
For example: on a Sony HB-10, everything works fine. But on a Sony HB-F700D I get an out of memory error.

Does anyone know a workaround for this?

By ARTRAG

Enlighted (6569)

Аватар пользователя ARTRAG

20-07-2020, 06:48

Try to boot keeping ctrl pressed or shift pressed

By Pineapple

Rookie (28)

Аватар пользователя Pineapple

20-07-2020, 16:09

Hey, that works!

Is that just a common issue / feature of Disk Basic enabled systems or something?

By Grauw

Ascended (10158)

Аватар пользователя Grauw

20-07-2020, 17:49

Disk Basic uses RAM for each attached drive, which reduces the space for your BASIC-program. Because Disk2ROM is used you create an extra disk drive in the system, so it reduces available memory in addition to the drives in the system.

Keeping CTRL pressed disables one of the disk drives (the 2nd is often a virtual disk-swap drive), which frees up some RAM. Keeping SHIFT pressed disables all disk drives, freeing up even more RAM, matching systems with only cassette. But then your Disk2ROM-based ROM probably won’t boot.

If you want to avoid this error (recommended), reduce the size of your program, for example by splitting it up into different parts (e.g. menu and game) that are loaded on demand.

By Pineapple

Rookie (28)

Аватар пользователя Pineapple

20-07-2020, 18:54

My program is only about 7-1/2k (without x-basic and padding).
I'm surprised that my rom will run on a system with only 16K of ram, but has issues on a system that has more than double that amount.

Anyway, I guess I'll try to optimize things a bit. Though, I already had the game split into 2 separate turbo chunks.

Страница 2/4
1 | | 3 | 4