Incognito
|
Timing Stuff (Game Gear)
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
|
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.
|
Incognito
|
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
|
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
|
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.
|
Incognito
|
Thanx *nt*
Posted: Tue Feb 12, 2002 7:48 am
|