Videopac / Odyssey2 forum

Programming the Videopac / Odyssey2 => Programming => Topic started by: Sdw on July 22, 2017, 01:19:19 AM



Title: PAL/NTSC differences (screen size, sound etc.?)
Post by: Sdw on July 22, 2017, 01:19:19 AM
Hello!

I have just started getting into O2/G7000 programming.
I've bought a G7000 and ordered a flashcart, but that hasn't arrived yet, so at the moment I'm doing all my testing in O2EmWin.

Now, some (perhaps beginner?) questions:

1) I read that the resolution of the O2 was 160x200 - is it the same for PAL (and there is just a bigger vblank area above/below), or has it more displayable lines?
2) I take it that the cycle count per frame differs though, anyone have numbers on those? I read that the NTSC machine has 6026 cycles per frame and therefore 23 cycles per line. Is it so nicely arranged that the PAL machine has the same (ie. instead of 60 frames of 262 lines of 23 cycles it has 50 frames of 312 lines of 23 cycles) or is there some difference that needs to be taken into account?
3) Is the sound generator affected by the PAL/NTSC difference, or is the it the exact same 983/3933 Hz on PAL as well?


Title: Re: PAL/NTSC differences (screen size, sound etc.?)
Post by: LD on August 03, 2017, 03:59:04 AM
1 - Resolution is the same, with more VBlank time.
2 - The processor is faster, there is around 26 cycles each scanline on PAL machines.
3 - I don't know about the sound.


Title: Re: PAL/NTSC differences (screen size, sound etc.?)
Post by: Rene_G7400 on August 03, 2017, 09:34:38 AM
1 - There are 243 active lines, and 70 lines of blanking on PAL consoles (NTSC: 242/21)
2 - The processor performs 25.3333 cycles per scan line on PAL consoles (NTSC: 22.75)
3 - There are some sound differences: the sound registers are updated by the processor each frame, but since PAL has less frames per second, sounds are played slower. The sound frequencies are based on the VDC clock, which is 3.58 MHz for NTSC and 3.54 MHz for PAL.


Title: Re: PAL/NTSC differences (screen size, sound etc.?)
Post by: Sdw on August 04, 2017, 11:50:47 AM
Thank you for your responses!

Seems like the differences in non-display area processing time is quite big, if we have 200 displayable lines.
On NTSC you get a tad over 1400 cycles, but on PAL you get over 2800, so about double!

Regarding Rene_G7400's comment about sound freuqency - you are talking about per-frame update of sound registers, but that is something that is done by your program, right? The sound circuit itself just shifts out 24 bits with the desired (983/3933) frequency, and then you can update those registers when you feel like it, so that could be compensated for quite easily, if you update every frame on PAL, you update 5 frames and skip the 6th on NTSC, and then replay speed should match OK, I've used this on C64 for example.
Or are you talking about some built in BIOS sound routines?


Title: Re: PAL/NTSC differences (screen size, sound etc.?)
Post by: Rene_G7400 on August 07, 2017, 10:19:31 AM
Or are you talking about some built in BIOS sound routines?

I'm talking about the sound player in BIOS. It is used for all sounds, not just for the built-in sounds. It decrements the counter that determines the duration of notes every frame, so on NTSC consoles the sound durations are shorter. You could write your own sound player if you want.


Title: Re: PAL/NTSC differences (screen size, sound etc.?)
Post by: Sdw on August 07, 2017, 09:15:25 PM
I'm talking about the sound player in BIOS. It is used for all sounds, not just for the built-in sounds. It decrements the counter that determines the duration of notes every frame, so on NTSC consoles the sound durations are shorter. You could write your own sound player if you want.

I was actually not aware that there was one, I wrote a simple sound routine myself, just putting the values into the control register and the 24-bit shift registers as needed!


Title: Re: PAL/NTSC differences (screen size, sound etc.?)
Post by: Rene_G7400 on August 08, 2017, 09:23:35 AM
Have you read the info on these pages?
http://web.archive.org/web/20130608030041/http://soeren.informationstheater.de:80/g7000/toc.html (http://web.archive.org/web/20130608030041/http://soeren.informationstheater.de:80/g7000/toc.html)