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 - Timing Stuff (Game Gear)

Reply to topic
Author Message
Incognito
  • Guest
Reply with quote
Timing Stuff (Game Gear)
Post Posted: Mon Feb 11, 2002 7:53 am
A Sega Game Gear is ever a PAL machine (50 frames per second),
each frame has 313 scanlines, right?

- How many Z80 TStates (Cycles) per frame/scanline?
- How to handle 313 scanlines with INPort $7F?

THX for your help!
 
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8653
  • Location: Paris, France
Reply with quote
Post Posted: Mon Feb 11, 2002 9:57 am
Quote
> A Sega Game Gear is ever a PAL machine (50 frames per second),
> each frame has 313 scanlines, right?

No, Game Gear is always running at a NTSC equivalent.

Quote
> - How many Z80 TStates (Cycles) per frame/scanline?
> - How to handle 313 scanlines with INPort $7F?

On PAL system, Port $7F values wrap at a certain amount and repeat some values. This is more precisely documented on Charles Mac Donald video documentation.
  View user's profile Send private message Visit poster's website
Incognito
  • Guest
Reply with quote
Post Posted: Mon Feb 11, 2002 12:24 pm
Quote
> > A Sega Game Gear is ever a PAL machine (50 frames per second),
> > each frame has 313 scanlines, right?

> No, Game Gear is always running at a NTSC equivalent.

Ah yes, ups ;)

Quote
> > - How many Z80 TStates (Cycles) per frame/scanline?
> > - How to handle 313 scanlines with INPort $7F?

> On PAL system, Port $7F values wrap at a certain amount and repeat some values. This is more precisely documented on Charles Mac Donald video documentation.

Sorry, but I have some problems with the timing stuff...
To get the correct timing I have to add the Z80 TStates to a cyclecounter (per OpCode) and then I check if a scanline have to be drawn? -> How many cycles per scanline????

Please help
 
Incognito
  • Guest
Reply with quote
Post Posted: Mon Feb 11, 2002 12:26 pm
(I use the official Zilog Z80 Family CPU User Manual (pdf) for the TStates...)
 
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8653
  • Location: Paris, France
Reply with quote
Post Posted: Mon Feb 11, 2002 9:23 pm
Quote
> To get the correct timing I have to add the Z80 TStates to a cyclecounter (per OpCode) and then I check if a scanline have to be drawn? -> How many cycles per scanline????

Assuming the CPU runs at 3.579545 Mhz, that makes 3579545 cycles per second.
Which make around (3579545/60) 59659.08 cycles per frame.
And (3579545/(60*262)) 227.70 cycles per scanline.
  View user's profile Send private message Visit poster's website
Incognito
  • Guest
Reply with quote
Thanx *nt*
Post Posted: Tue Feb 12, 2002 7:48 am
Thanx
 
Reply to topic



Back to the top of this page

Back to SMS Power!