Welcome, Guest. Please login or register.

Author Topic: Code to boot into PAL or NTSC modes?  (Read 4440 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline blakespotTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 872
  • Country: us
  • Thanked: 8 times
  • Gender: Male
  • Visit ByteCellar.com
    • Show only replies by blakespot
    • ByteCellar - The Vintage Computing Blog
Code to boot into PAL or NTSC modes?
« on: December 31, 2012, 03:07:49 AM »
I own an enjoy an HxC2001 floppy emulator. I have it in my Amiga 2000.

http://www.bytecellar.com/2011/04/17/my-sdcard-hxc-2001-floppy-emulator-adventure/

Many systems can benefit from the device, but few have written for them a native, software boot menu. The Amiga is one.

I am an American user with an NTSC A2000. I would, usually, load Degrader to set to PAL mode and then reboot to run all demos and many games. This is not really possible in the event chain of using the HxC2001.

I have requested that the devs add PAL / NTSC boot options into the native Amiga disk select app, on reboot. The devs have asked after Degrader. If it is open source. What they are after is example code showing how to change the PAL / NTSC system state on an Amiga with the sufficient Agnus to get it done.

Can someone point me to code that shows how to change state on reboot, to help these guys get the feature added. It would be a huge boon to me and all that use the HxC2001 on the Amiga I think.

Thanks much to anyone who can help. I will pass any and all info shared here along to the HxC2001 devs.





bp
:: ByteCellar.com - The Vintage Computing Weblog
:: Amigas: 1000, 2000 '020, SAM440ep-Flex
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #1 on: December 31, 2012, 03:54:57 AM »
Why can't u boot your PALboot floppy disk first
and then boot your game disk 2nd?

Like we have been doing since 1980s?

If it is a floppy disk emulator then surely it works exactly like a real floppy disk works?
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline desiv

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1269
    • Show only replies by desiv
Re: Code to boot into PAL or NTSC modes?
« Reply #2 on: December 31, 2012, 05:00:45 AM »
Quote from: ChaosLord;720757
If it is a floppy disk emulator then surely it works exactly like a real floppy disk works?
While I agree that it should work that way (I don't have one)..

It would be nice to not have to do that, and if the floppy emulator menu could, it would be nice...

desiv
p.s.  Here's some code for doing the opposite.  Haven't looked too much at the source, but could help.
http://cd.textfiles.com/sourcecode/usenet/compsrcs/amiga/volume90/util/ntscboot
« Last Edit: December 31, 2012, 05:03:14 AM by desiv »
Amiga 1200 w/ ACA1230/28 - 4G CF, MAS Player, ext floppy, and 1084S.
Amiga 500 w/ 2M CHIP and 8M FAST RAM, DCTV, AEHD floppy, and 1084S.
Amiga 1000 w/ 4M FAST RAM, DUAL CF hard drives, external floppy.
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #3 on: December 31, 2012, 05:10:45 AM »
Quote from: desiv;720758
While I agree that it should work that way (I don't have one)..

It would be nice to not have to do that, and if the floppy emulator menu could, it would be nice...

desiv


But its a disk emulator.  Surely it can boot a palboot disk in say... 0.1 seconds?

Then the user selects his option(s) and clicks the button.

Hmmm....  Is that the problem?  You can never change the disk after you pick?

This whole thing makes no sense to me.

If u can only pick one floppy... then what good is the device?  What if the game takes more than 1 disk?  How do u change the disk in the middle of the game?  It just crashes?


And it makes no sense to ask for just a PAL/NTSC option when that only fixes some games.  What about all the games that require you to disable all fastmem?  What about all games that require u to disable all external drives?  What about all the games that require ALL memory above 512k to be disabled?  There are many different options that are required but those are the most common.  There are a few games that require exactly KS 1.2 or exactly KS1.1 or exactly KS1.3 or KS2.04+ or KS3.0+
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline desiv

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1269
    • Show only replies by desiv
Re: Code to boot into PAL or NTSC modes?
« Reply #4 on: December 31, 2012, 05:15:47 AM »
Quote from: ChaosLord;720759
But its a disk emulator.  Surely it can boot a palboot disk in say... 0.1 seconds?
It still depends..
If I can have a setting per disk image, and select that disk image and it knows to boot it into PAL, then I don't have to select the PALboot disk image, wait 0.1 seconds and then select the disk image I want.
It's not the time to load the disk, but the time for the process that can be saved.

Again, I agree it's not a big deal, BUT..
If they can make it all in one selection, then it's that much easier..

Also, here's a better page with info on switching..
http://thecryptmag.com/Online/49/PaltoNTSCandBack.html

desiv
Amiga 1200 w/ ACA1230/28 - 4G CF, MAS Player, ext floppy, and 1084S.
Amiga 500 w/ 2M CHIP and 8M FAST RAM, DCTV, AEHD floppy, and 1084S.
Amiga 1000 w/ 4M FAST RAM, DUAL CF hard drives, external floppy.
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #5 on: December 31, 2012, 05:16:32 AM »
Quote from: blakespot;720754

I am an American user with an NTSC A2000. I would, usually, load Degrader to set to PAL mode and then reboot to run all demos and many games. This is not really possible in the event chain of using the HxC2001.


Are you sure about this?

So I can't play any of the thousands of Amiga games that come on 2 disks or more?

So basically I can't play any Cinemaware game?
I can't play Superfrog?
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline desiv

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1269
    • Show only replies by desiv
Re: Code to boot into PAL or NTSC modes?
« Reply #6 on: December 31, 2012, 05:24:26 AM »
No, it is possible..
The HxC let's you swap disks...
BUT, he's talking about the Amiga disk menu program that they have.

The HxC allows disk changes with buttons and an LCD, and that works...

But they have a full screen Amiga program that lets you choose which disk (again, you don't HAVE to use that, you can use the LCD and the buttons).  But using THIS program (as it's an Amiga program), you can't run a degrader disk  and then the game.
So you couldn't use that program to load Degrader, choose PAL, then reboot to THAT program again to choose your next disk.
Now, you can use the buttons and the LCD...
So you don't have to worry about running multi-disk games!!!

BUT, IF you ONLY want to use that menu program to load games AND have them be in PAL, having that program place the system in PAL would work.

And many many many more games are PAL than have weird requirements around memory config.

So this isn't about the HxC not being able to do it..
It's about the menu disk choice Amiga program.....

desiv
Amiga 1200 w/ ACA1230/28 - 4G CF, MAS Player, ext floppy, and 1084S.
Amiga 500 w/ 2M CHIP and 8M FAST RAM, DCTV, AEHD floppy, and 1084S.
Amiga 1000 w/ 4M FAST RAM, DUAL CF hard drives, external floppy.
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #7 on: December 31, 2012, 05:42:43 AM »
Ok so he just wants to build in degrader (or other similar tool(s)) in such a way that it looks kewl with demofx and music and stuff.  Like that thing they use on PS3.

You can always disassemble degrader.  Tho there are easier ways.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #8 on: December 31, 2012, 05:47:43 AM »
Quote from: desiv;720763

And many many many more games are PAL than have weird requirements around memory config.


True.  But there are still hundreds of games with weird memory config or must disable extra floppy drives config.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #9 on: December 31, 2012, 05:55:45 AM »
Quote from: desiv;720763

But they have a full screen Amiga program that lets you choose which disk (again, you don't HAVE to use that, you can use the LCD and the buttons).  But using THIS program (as it's an Amiga program), you can't run a degrader disk  and then the game.
So you couldn't use that program to load Degrader,

But its an Amiga.  Any program can run any other program.  Its called Multitasking.  On the Amiga, all programs love each other and play with each other any time they want. :knuddel:

Their special bootmenu program can have a "Run Degrader" option.  Which then runs Degrader.  Quick ten minute fix.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: Code to boot into PAL or NTSC modes?
« Reply #10 on: December 31, 2012, 11:36:14 AM »
BEAMCON0 bit 5 toggles between NTSC and PAL.

http://amiga.rules.no/sources/dblpal.s

You must have an Agnus which supports this (i.e. won't work on A1000 or early A2000)
« Last Edit: December 31, 2012, 11:40:36 AM by alexh »
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #11 on: December 31, 2012, 12:22:34 PM »
Quote from: alexh;720784
BEAMCON0 bit 5 toggles between NTSC and PAL.


There is more to it than that.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline psxphill

Re: Code to boot into PAL or NTSC modes?
« Reply #12 on: December 31, 2012, 03:13:16 PM »
Quote from: ChaosLord;720788
There is more to it than that.

It's generally all that anyone does though.
 
http://thecryptmag.com/Online/49/PaltoNTSCandBack.html
 
You can update execbase too, the source code here does that.
 
http://aminet.net/util/misc/60HzEmulator.lha
 
A lot of the source is useless, it allows switching using key combinations and faking vblank using a cia (if you don't have a fat agnus).
Updating exec base is mostly useless, generally the reason why you are switching is because the software doesn't bother to detect the mode.
« Last Edit: December 31, 2012, 03:22:32 PM by psxphill »
 

Offline desiv

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1269
    • Show only replies by desiv
Re: Code to boot into PAL or NTSC modes?
« Reply #13 on: December 31, 2012, 03:32:59 PM »
Quote from: ChaosLord;720768
But its an Amiga.  Any program can run any other program.  Its called Multitasking.
Well, not ANY program, but that is true..

Quote from: ChaosLord;720768
Their special bootmenu program can have a "Run Degrader" option.  Which then runs Degrader.  Quick ten minute fix.

If Degrader multitasks happily, and so does their app, that would work great!!
Heck, just spawn degrader in the background and tell the user to Amiga-M to get to it.  ;-)

desiv
Amiga 1200 w/ ACA1230/28 - 4G CF, MAS Player, ext floppy, and 1084S.
Amiga 500 w/ 2M CHIP and 8M FAST RAM, DCTV, AEHD floppy, and 1084S.
Amiga 1000 w/ 4M FAST RAM, DUAL CF hard drives, external floppy.
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: Code to boot into PAL or NTSC modes?
« Reply #14 on: December 31, 2012, 04:31:48 PM »
Quote from: psxphill;720790
It's generally all that anyone does though.
 
http://thecryptmag.com/Online/49/PaltoNTSCandBack.html
 
You can update execbase too, the source code here does that.
 
http://aminet.net/util/misc/60HzEmulator.lha
 
A lot of the source is useless, it allows switching using key combinations and faking vblank using a cia (if you don't have a fat agnus).
Updating exec base is mostly useless, generally the reason why you are switching is because the software doesn't bother to detect the mode.


All I know is there is more to it than just switching the video mode to PAL.  You do that with a single instruction, no need for reboot.  It also won't make most PAL games actually work.  I assume it is that execbase thing is the secret magic but I never knew.  Now that I think about it, I think it is the execbase thing.  But u can't just do it "in real time".  You would need to change the execbase var and then reset so that the whole OS is "aligned" to the new video mode.  Else all the Amigas blitting routines and so forth would have wrong clip limits, wrong overscan limits, etc.  Nothing will work right.

There are 2 kinds of palboot utilities.
A: The kind that claim to work instantly but do not actually work. They do switch the video to PAL mode but 99% of games do not work right then.  A giant portion of the screen gets chopped off or other weird things.

B: The kind that does some secret magix and then resets your Amiga.  Those kind actually work with all PAL games.

I have tested a gazillion palswitchers that don't actually work + a few others that do really work.  I even coded one myself.  I just set the beamcon bit and BAM I was in PAL mode.  It was awesome.  It was also completely useless.  Anytime I loaded a PAL game it was all screwed up.  Only using a real PALbooter that resets the machine actually works.

@FloppyEmu guys: You have been warned.

p.s. I have not read the article linked above.  I assume it has all the needed infos but I am not sure.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA