Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - How to set Ishmair's MZ80

Reply to topic
Author Message
NeoZeed
  • Guest
Reply with quote
How to set Ishmair's MZ80
Post Posted: Wed Sep 08, 1999 6:52 pm

Hello all,

Sorry for this dumb question, every one had started one day.

So here's my problem : I would like to start emulator programming with a SG1000 emulator. So i decide to use the Ishmair Z80 cpu core. I use VC++6.0. I have problem to set the core correctly . here's what i 've done :

first build MZ80.c -> MZ80.exe

type : makez80 MZ80.asm -s (as said in the doc)

and then i build the obj : NASMw -f win32 mz80.asm

Each time i compile my code , it's all right but when i link, i always get message like these :

Sg1000.obj : error LNK2005: "struct mz80context * Z80" (?Z80@@3PAUmz80context@@A) already defined in main.obj

Sg1000.obj : error LNK2001: unresolved external symbol "unsigned short __cdecl InJoyP1(unsigned short,struct z80PortRead *)" (?InJoyP1@@YAGGPAUz80PortRead@@@Z)

Does anyone could help me. For linking with the obj , i've specified the mz80.obj in the project setting menu, tabs object/library. Is it right.

I really need your help, please

tia

Neozeed

 
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Post Posted: Wed Sep 08, 1999 8:43 pm
First, you aren't using Ishmair's Z80 emulator but Neil Bradley's Z80 emulator. It's not the same person..

Quote
> Sg1000.obj : error LNK2005: "struct mz80context * Z80" (?Z80@@3PAUmz80context@@A) already defined in main.obj

Just read the message. It's english, you know ;)
You must have defined a pointer to a mz80context structure called Z80 and it's already defined in the CPU emulator.

Quote
> Sg1000.obj : error LNK2001: unresolved external symbol "unsigned short __cdecl InJoyP1(unsigned short,struct z80PortRead *)" (?InJoyP1@@YAGGPAUz80PortRead@@@Z)

Again, it doesn't seems to be related to the core itself. You declared the "InJoyP1" function in the input ports table and it doesn't exists in your emulator other files.

In any cases, be aware that you cannot uses user function to access the memory on Neil's core so you won't be able to use bankswitching easily. But it's fine for a SG-1000 emulator.
  View user's profile Send private message Visit poster's website
NeoZeed
  • Guest
Reply with quote
Post Posted: Thu Sep 09, 1999 6:05 am
Quote
> First, you aren't using Ishmair's Z80 emulator but Neil Bradley's Z80 emulator. It's not the same person..

Oops many sorry Neil , i'll won't do it anymore.

Quote
> > Sg1000.obj : error LNK2005: "struct mz80context * Z80" (?Z80@@3PAUmz80context@@A) already defined in main.obj

> Just read the message. It's english, you know ;)
> You must have defined a pointer to a mz80context structure called Z80 and it's already defined in the CPU emulator.

> > Sg1000.obj : error LNK2001: unresolved external symbol "unsigned short __cdecl InJoyP1(unsigned short,struct z80PortRead *)" (?InJoyP1@@YAGGPAUz80PortRead@@@Z)

> Again, it doesn't seems to be related to the core itself. You declared the "InJoyP1" function in the input ports table and it doesn't exists in your emulator other files.

> In any cases, be aware that you cannot uses user function to access the memory on Neil's core so you won't be able to use bankswitching easily. But it's fine for a SG-1000 emulator.

It's only for learning, i just want to do a simple emulator with DirectX.

Thanks zoop to respond to these very dumb questions,
i'll retry asap.
 
Reply to topic



Back to the top of this page

Back to SMS Power!