Welcome, Guest. Please login or register.

Author Topic: PAL/NTSC Check?  (Read 3140 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Super TWiTTopic starter

  • Full Member
  • ***
  • Join Date: Aug 2009
  • Posts: 222
    • Show only replies by Super TWiT
PAL/NTSC Check?
« on: November 10, 2010, 02:35:32 PM »
I am trying to sort out whether I truly have a pal or ntsc amiga and test different emulated conditions as well.  As it turns out, sysinfo always says I am operating under a pal setup (both with my real amiga and an emulated ntsc amiga 500).  Anyway, I found this assembler code from here.  When trying to assemble the topmost example with vasmm68k for linux, I get these errors
Quote
error 4 in line 1 of "code": no current section specified

error 4 in line 2 of "code": no current section specified

error 4 in line 3 of "code": no current section specified

warning 1022 in line 5 of "code": missing '

error 4 in line 5 of "code": no current section specified

error 4 in line 6 of "code": no current section specified

***maximum number of errors reached!***
Anyone have any ideas as to why the example code won't work?  Is it the way my text editor saves unix-type line returns?
Once there was a man and a boy in the woods.
 
Boy: I\'m scared...
 
Man: Hah! What have you got to be afraid of? I\'m the one that\'s going to be coming back alone!
 

Offline Franko

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 5707
    • Show only replies by Franko
Re: PAL/NTSC Check?
« Reply #1 on: November 10, 2010, 02:45:49 PM »
Quote from: Super TWiT;590725
I am trying to sort out whether I truly have a pal or ntsc amiga and test different emulated conditions as well.  As it turns out, sysinfo always says I am operating under a pal setup (both with my real amiga and an emulated ntsc amiga 500).  Anyway, I found this assembler code from here.  When trying to assemble the topmost example with vasmm68k for linux, I get these errorsAnyone have any ideas as to why the example code won't work?  Is it the way my text editor saves unix-type line returns?


While I only use DevPac myself and not in the standard way (ie: with includes etc...), after a quick look at the code your using, is the assembler package you use setting up the proper assign & includes for assembling. Otherwise things like the line...

cmp.b   #50,VBlankFrequency(a6)

The label VBlankFrequency would not be recognised...

I could quickly Assemble the code myself for you into a 68k prog and email you it if you really need it... :)
 

Offline Super TWiTTopic starter

  • Full Member
  • ***
  • Join Date: Aug 2009
  • Posts: 222
    • Show only replies by Super TWiT
Re: PAL/NTSC Check?
« Reply #2 on: November 10, 2010, 02:55:42 PM »
I have no idea, I am completely new to assembly, and just was using vasm because it was free.  This is how I executed vasm from my terminal:
Quote
./vasmm68k_mot -o test code
The ./ is just launching an executable in linux.  I tried to run this
Quote
./vasmm68k_mot -Fhunkexe -o test -nosym code
as suggested by their tutorial to compile a CLI application, but I got this back
Quote
fatal error 17: could not initialize output module
Once there was a man and a boy in the woods.
 
Boy: I\'m scared...
 
Man: Hah! What have you got to be afraid of? I\'m the one that\'s going to be coming back alone!
 

Offline Super TWiTTopic starter

  • Full Member
  • ***
  • Join Date: Aug 2009
  • Posts: 222
    • Show only replies by Super TWiT
Re: PAL/NTSC Check?
« Reply #3 on: November 10, 2010, 03:09:37 PM »
Okay, now we are getting somewhere.  I recompiled the application from source, and now the hunkexe module IS found.  Now, the compile errors I get are
Quote
warning 7 in line 5 of "code": ' expected

error 1 in line 5 of "code": illegal operand types

warning 7 in line 6 of "code": ' expected

error 1 in line 6 of "code": illegal operand types
I looked and there doesn't appear to be a produced output file.
Once there was a man and a boy in the woods.
 
Boy: I\'m scared...
 
Man: Hah! What have you got to be afraid of? I\'m the one that\'s going to be coming back alone!
 

Offline Franko

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 5707
    • Show only replies by Franko
Re: PAL/NTSC Check?
« Reply #4 on: November 10, 2010, 03:14:35 PM »
Sorry I don't have a clue about Linux, but a quick look at the code your trying to assemble...

   move.l   4.w,a6          ; execbase
   cmp.b   #50,VBlankFrequency(a6)
   beq.s   .pal

     jmp   I'm NTSC
.pal   jmp   I'm PAL

   move.l  GfxBase,a6
     btst      #2,gb_DisplayFlags(a6)  ; Check for PAL
   bne.s   .pal

     jmp   I'm NTSC
.pal   jmp   I'm PAL


Firstly this would not assemble into anything useable even from the cli/shell. It needs routine's to print out on the cli/shell the result ie: PAL or NTSC. All this bit of code is for is to show you which bit's of the exec.library & graphics.library you would need to check in order to find out whether your Amiga is running in PAL or NTSC mode.

So unless you have the source code for the rest of the routines their is not much point in trying to assemble it at all, sorry... :(
 

Offline Super TWiTTopic starter

  • Full Member
  • ***
  • Join Date: Aug 2009
  • Posts: 222
    • Show only replies by Super TWiT
Re: PAL/NTSC Check?
« Reply #5 on: November 10, 2010, 03:24:06 PM »
I don't, I just saw it online....:(  Do you know of any program that will tell me if I'm operating in ntsc or pal mode?  I tried sysinfo, but it always (no matter on my real amiga or on an emulated amiga which definitely is set to ntsc) that I'm running in PAL mode.
Once there was a man and a boy in the woods.
 
Boy: I\'m scared...
 
Man: Hah! What have you got to be afraid of? I\'m the one that\'s going to be coming back alone!
 

Offline mechy

Re: PAL/NTSC Check?
« Reply #6 on: November 10, 2010, 03:37:54 PM »
Quote from: Super TWiT;590746
I don't, I just saw it online....:(  Do you know of any program that will tell me if I'm operating in ntsc or pal mode?  I tried sysinfo, but it always (no matter on my real amiga or on an emulated amiga which definitely is set to ntsc) that I'm running in PAL mode.


Try whichamiga from aminet, it will tell you just about everything i think.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: PAL/NTSC Check?
« Reply #7 on: November 10, 2010, 03:44:19 PM »
Instead of this test:

cmp.b   #50,VBlankFrequency(a6)

You could  write a few lines of C:
Code: [Select]
#include <stdio.h>
#include <exec/execbase.h>
#include <proto/exec.h>

int main(int argn, char** argv)
{
printf(&quot;VBlankFrequency is %u Hz\n&quot;, (unsigned)SysBase->VBlankFrequency);
return 0;
}

This will just print out the frequency, it won't do anything else. You should probably do it via GfxBase if using 2.x or higher.

Pretty sure that can be trimmed down if you use dos.library print rather than C stdio.
« Last Edit: November 10, 2010, 03:48:13 PM by Karlos »
int p; // A
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show only replies by Zac67
Re: PAL/NTSC Check?
« Reply #8 on: November 11, 2010, 07:35:10 AM »
Why, the easiest way to find out is to disable startup-sequence in Early Bootmenu and then ask your monitor what it's running on.