Running raw z80 code on MSX

Page 2/2
1 |

By Pencioner

Paladin (990)

Pencioner's picture

04-04-2018, 10:21

Grauw wrote:

About end address, I think it’s begin address + length - 1 ?

Yes my mistake, i just realized that i used wrong value everytime when added header manually. Though, BLOAD is very flexible about this - it will load anyway... Smile that's why i didn't notice this mistake

By Timmy

Expert (114)

Timmy's picture

04-04-2018, 10:25

There is a simple way to see if your code is easily relocatable. Just change the "org 40000" into "org 50000", and see if the resulting numbers have changed. If they do then your code is not relocatable and has to be started on 40000.

And no, your code is absolutely not relocatable, and it would be a lot of work to do so. Smile

By M2X_E1

Rookie (21)

M2X_E1's picture

04-04-2018, 22:20

Ah, missed that one, yes the data location and puts function is indeed relative to the beginning of the program.
I've used the org address 9C40 as the start and beginning address, and the end address is the start + length of original code (excluding any headers) -1

Below is the hexadecimal values for hex-editor, save as test.bin, popped onto dsk image and successfully runs in bluMSX when i use BLOAD"myfile.bin",R

FE 40 9C 5F 9C 40 9C 21 50 9C CD 47 9C C9 7E B7 C8 CD A2 00 23 18 F7 48 65 6C 6C 6F 2C 20 77 6F 72 6C 64 21 0D 0A 00

I've already created a small program to play SID Compositions on Arduino, I may be able to cross compile it over to MSX with a SID chip connected to the expansion port with some effort. I know many have some reservations about the SID chip on an msx though LOL!

Thanks again,
Regards

By Grauw

Ascended (8508)

Grauw's picture

05-04-2018, 00:54

Nice that you got it working! Smile

Since the Playsoniq expansion cartridge contains amongst others a SID, we’re already beyond the point to be outraged by that I guess Big smile.

By M2X_E1

Rookie (21)

M2X_E1's picture

06-04-2018, 18:41

Grauw wrote:

Nice that you got it working! Smile

Since the Playsoniq expansion cartridge contains amongst others a SID, we’re already beyond the point to be outraged by that I guess Big smile.

Yeah Big smile The play sonic looks like an interesting piece of kit, I'll certainly look into the specs. My main project for a long while was to work the sid straight off the z80, I find the MSX environment will work in my favour in terms of getting it running. Who knows, will see where it leads.

Thanks again,

Page 2/2
1 |