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 - Progress on Emu

Reply to topic
Author Message
Jason Starr
  • Guest
Reply with quote
Progress on Emu
Post Posted: Thu Feb 03, 2000 4:22 am
HI all.. just a little status update and a question or two. Ive got my emulator emulating instructions from the SMS rom. At the moment i've just got the memory mapped, the cpu and a few port functions and interupts(not sure if implemented correctly). IM using Marats z80 core and at the moment im testing my emulator on 32k carts as I havnt totally implemented banking yet. With hangon it seems to stop at 7618h which is a HALT instruction. I know a HALT instruction stops the cpu and waits for an interupt so yeah i guess my interupts arent working properly. Is this because i have incorrectly set the Iperiod? What should Iperiod be? And if anyone would like to email for whatever reason, please do so.

-Jason Starr-
 
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Post Posted: Thu Feb 03, 2000 11:34 am
Quote
> HI all.. just a little status update and a question or two. Ive got my emulator emulating instructions from the SMS rom. At the moment i've just got the memory mapped, the cpu and a few port functions and interupts(not sure if implemented correctly). IM using Marats z80 core and at the moment im testing my emulator on 32k carts as I havnt totally implemented banking yet. With hangon it seems to stop at 7618h which is a HALT instruction. I know a HALT instruction stops the cpu and waits for an interupt so yeah i guess my interupts arent working properly. Is this because i have incorrectly set the Iperiod? What should Iperiod be? And if anyone would like to email for whatever reason, please do so.

IPeriod is commonly used to talk about the number of cycle executed per scanline.
You can calculate it easily, knowing the CPU speed and the TV type.

On a NTSC tv, there is 262 lines and the whole screen is refreshed 60 times per second.
So IPeriod = CPUSPEED/262/60 = 228 with a Z80 of 3.5797 Mhz as on SMS/GG.

Be warned thought, that on early stage of your emulator, the bug with hangon might come from many things.
Adding that to the fact I doubt there is valid Z80 code at 7618h considering the game is 32kb and the end of ROM should contains data (graphics/musics).
  View user's profile Send private message Visit poster's website
Jason Starr
  • Guest
Reply with quote
Post Posted: Thu Feb 03, 2000 3:23 pm
Quote
> > HI all.. just a little status update and a question or two. Ive got my emulator emulating instructions from the SMS rom. At the moment i've just got the memory mapped, the cpu and a few port functions and interupts(not sure if implemented correctly). IM using Marats z80 core and at the moment im testing my emulator on 32k carts as I havnt totally implemented banking yet. With hangon it seems to stop at 7618h which is a HALT instruction. I know a HALT instruction stops the cpu and waits for an interupt so yeah i guess my interupts arent working properly. Is this because i have incorrectly set the Iperiod? What should Iperiod be? And if anyone would like to email for whatever reason, please do so.

> IPeriod is commonly used to talk about the number of cycle executed per scanline.
> You can calculate it easily, knowing the CPU speed and the TV type.

> On a NTSC tv, there is 262 lines and the whole screen is refreshed 60 times per second.
> So IPeriod = CPUSPEED/262/60 = 228 with a Z80 of 3.5797 Mhz as on SMS/GG.

> Be warned thought, that on early stage of your emulator, the bug with hangon might come from many things.
> Adding that to the fact I doubt there is valid Z80 code at 7618h considering the game is 32kb and the end of ROM should contains data (graphics/musics).

Well I found out what I was doing wrong. I didnt define LSB in marat's z80 core and I had a slight error in my memory map. Well im glad to say now my memory mapper is almost 100% perfect. Thanks for the Iperiod help Zoop, its appreciated. Did you use allegro's sound routines to emulate the SMS sound? If so which functions did you use.. going through the Allegro documentation all i could find was how to play samples (wav files) and how to alter them. Also is BRSMS's debugger accurate? Doesnt seem to be too accurate in my experience. Thanks again zoop.

-Jason Starr-
 
  • Joined: 24 Jun 1999
  • Posts: 1732
  • Location: Paris, France
Reply with quote
Post Posted: Thu Feb 03, 2000 8:23 pm
Quote
>Did you use allegro's sound routines to emulate the SMS sound?

Not all at.

Quote
>If so which functions did you use.. going through the Allegro documentation all i could find was how to play samples (wav files) and how to alter them.

You can use the sound streaming functionnality of Allegro and do wave synthesis.

Quote
>Also is BRSMS's debugger accurate? Doesnt seem to be too accurate in my experience.

Haven't heavily used it but from what I know it's "accurate" (read: working as it should be).
  View user's profile Send private message Visit poster's website
Eric
  • Guest
Reply with quote
Post Posted: Thu Feb 03, 2000 11:15 pm
Quote
> ...
> Also is BRSMS's debugger accurate? Doesnt seem to be too accurate in my experience. Thanks again zoop.

I'm reluctant to even bring this up, but since you seem to be in the appropriate stage of your development, the following might be useful to you:

I've been working on a SMS/GG debugging emulator called MesaDX for some time now. Currently, it only includes Z80 and memory system emulation. Some of the features include: unassembly, register, and memory view, breakpoints, register and memory editing, and memory access protection. It also has a more advanced unassembly viewer than most SMS emulators: it allows you to freely scroll forward and backward through the listing.

MesaDX is far from complete, but is a useful tool for Z80 code debugging. I have a web-page located at: http://home.att.net/~e-quinn/MesaDX/MesaDX.html The web-page includes a users manual and information about MesaDX's features.

Hope this helps.

Eric Quinn
 
Jason Starr
  • Guest
Reply with quote
*NT* Thanks Eric
Post Posted: Fri Feb 04, 2000 1:53 am
Quote
> > ...
> > Also is BRSMS's debugger accurate? Doesnt seem to be too accurate in my experience. Thanks again zoop.

> I'm reluctant to even bring this up, but since you seem to be in the appropriate stage of your development, the following might be useful to you:

> I've been working on a SMS/GG debugging emulator called MesaDX for some time now. Currently, it only includes Z80 and memory system emulation. Some of the features include: unassembly, register, and memory view, breakpoints, register and memory editing, and memory access protection. It also has a more advanced unassembly viewer than most SMS emulators: it allows you to freely scroll forward and backward through the listing.

> MesaDX is far from complete, but is a useful tool for Z80 code debugging. I have a web-page located at: http://home.att.net/~e-quinn/MesaDX/MesaDX.html The web-page includes a users manual and information about MesaDX's features.

> Hope this helps.

> Eric Quinn
 
Jose Manuel Delgao
  • Guest
Reply with quote
Post Posted: Fri Feb 04, 2000 9:49 am
I´m bored of say that if you want a good and very accurate debugguer try Calypso: http://www.tel.uva.es/˜jdelmen. Also, if you wanta new feature not implemented, send me and email and I implement it if possible.

Saludos,

Jose Manuel
 
Jason STarr
  • Guest
Reply with quote
DeBug This!
Post Posted: Sat Feb 05, 2000 4:09 am
Quote
> I´m bored of say that if you want a good and very accurate debugguer try Calypso: http://www.tel.uva.es/˜jdelmen. Also, if you wanta new feature not implemented, send me and email and I implement it if possible.

> Saludos,

> Jose Manuel

Jose Jose Jose.. I have Calypso and use its debugger because I found it better than BRSMS's. I was just wondering about BrSms's accuracy (which is correct). But your debugger is still easier to use. Cheers :)

-Jason Starr-
 
Reply to topic



Back to the top of this page

Back to SMS Power!