Using ASMLIB for MSX

Post Reply
AxelStone
New member
Posts: 7
Joined: Thu Oct 24, 2019 7:38 pm

Using ASMLIB for MSX

Post by AxelStone »

Hello everyone, I'm trying my first code using asmlib from Konamiman. I'd like to test BiosCall, so I try with the simplest function (BEEP). Here goes my code:

Code: Select all

#include <stdio.h>
#include <arch/msx/asm.h>

#define BEEP 0x00C0

Z80_registers regs;
register_usage usage;

int main()
{
        usage = REGS_NONE;
        BiosCall(BEEP,&regs,usage);
    return 0;
}
Instead of BEEP I get a weird sound sometimes and other times silence. What's wrong?

Thanks.
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I've just run through this with a debugger and I can't replicate this.

Everytime the program is run I end up at address 0xC0 and a beep is made. This is using the takeda emulator.

Just as a sanity check, what version of z88dk are you using?
AxelStone
New member
Posts: 7
Joined: Thu Oct 24, 2019 7:38 pm

Post by AxelStone »

Hello dom, this one according to info:
zcc - Frontend for the z88dk Cross-C Compiler - v15371-4af3b45-20191011

I compile the source with this command:
zcc +msx -subtype=msxdos2 -create-app -otest.com test.c -lmsx_clib

To get a DOS2 executable. I've tried OpenMSX, which one is the takeda emulator? Thanks.
AxelStone
New member
Posts: 7
Joined: Thu Oct 24, 2019 7:38 pm

Post by AxelStone »

Wow you are right, just tested on real MSX and it works perfect. OpenMSX is not working in the right way :-(.

Perhaps I should use the takeda emulator you say, please let me know which one is ;-). Thanks.
User avatar
dom
Well known member
Posts: 2072
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

The takeda emulator is here: http://takeda-toshiya.my.coocan.jp - it comes without ROMs which can make setting it up a little tricky but I've got sets for most of the machines now.

I think BlueMSX is the most common development emulator, however it doesn't run properly under wine which is why I use the takeda one.
Post Reply