Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: blakespot on December 31, 2012, 03:07:49 AM

Title: Code to boot into PAL or NTSC modes?
Post by: blakespot 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
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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?
Title: Re: Code to boot into PAL or NTSC modes?
Post by: desiv 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
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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+
Title: Re: Code to boot into PAL or NTSC modes?
Post by: desiv 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
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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?
Title: Re: Code to boot into PAL or NTSC modes?
Post by: desiv 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
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: alexh 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)
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: psxphill 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.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: desiv 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
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord 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.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord on December 31, 2012, 04:35:48 PM
Quote from: desiv;720791

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.  ;-)

The program can do a ScreenToFront() (or whatever its called) on the other screen to pop it up automagixically :)
Title: Re: Code to boot into PAL or NTSC modes?
Post by: psxphill on December 31, 2012, 06:52:48 PM
Quote from: ChaosLord;720796
Else all the Amigas blitting routines and so forth would have wrong clip limits, wrong overscan limits, etc. Nothing will work right.

Setting the refresh rate doesn't change how much chip ram has been allocated for the screen, so blitting would never be affected.
 
I'm pretty sure that it just leaves a blank area or clips the screen, depending on whether you're going from NTSC to PAL or PAL to NTSC.
 
Most games never look at execbase, they just open the screen they want (and usually with custom copper lists). Running a PAL game on an NTSC Amiga just crops the bottom off.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord on December 31, 2012, 07:11:50 PM
Quote from: psxphill;720811
Setting the refresh rate doesn't change how much chip ram has been allocated for the screen, so blitting would never be affected.
 
I'm pretty sure that it just leaves a blank area or clips the screen, depending on whether you're going from NTSC to PAL or PAL to NTSC.
 
Most games never look at execbase, they just open the screen they want (and usually with custom copper lists). Running a PAL game on an NTSC Amiga just crops the bottom off.


A game does not have to "look at execbase".  It merely has to look at or use something that once upon a time, when the computer first booted up, got set as a result of execbase.

Are you claiming that all games do not use MrgCop()?  Or any other routine in the kickstart ROM whatsoever?

I have seen disassemblies of games and they DO use OS routines.  Those routines behave differently depending on the mode the computer was in when it first booted.


For the few games that literally do not use any kickstart routines at all, a simple switch to pal mode should work, theoretically.

For all other games one must do a "deep" palboot.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: psxphill on December 31, 2012, 07:22:24 PM
Quote from: ChaosLord;720813
Are you claiming that all games do not use MrgCop()? Or any other routine in the kickstart ROM whatsoever?

Most games don't, they disable multitasking, use custom copper lists etc.
 
WHDLOAD has to do it's magic to run them from hard disk.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: Mrs Beanbag on December 31, 2012, 07:52:34 PM
Even a game that runs normally from hard disk can still disable multitasking and use custom copper lists, and be otherwise system friendly.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord on January 01, 2013, 12:25:07 PM
Quote from: psxphill;720815
Most games don't, they disable multitasking,

You can disable multitasking and still easily call OS routines located in kickstart ROM.

Quote

 use custom copper lists etc.

I use custom copper lists in my 100% AmigaOS compliant, fully multitasking, play while online, games.

Using custom copper lists does not mean u never use the OS.

And u definitely can't make a reliable palboot just by setting that one bit that flips the video into PAL mode.  There is more to it than that.  I have played at least 1000 different PALboot games and I have seen the problems with my own eyes a zillion times.  A good palbooter works perfectly on all games.  A super simple one might work ok for a few games but all the rest will be braindamaged.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord on January 01, 2013, 12:26:15 PM
Quote from: Mrs Beanbag;720817
Even a game that runs normally from hard disk can still disable multitasking and use custom copper lists, and be otherwise system friendly.

+1
Title: Re: Code to boot into PAL or NTSC modes?
Post by: psxphill on January 01, 2013, 12:59:16 PM
Quote from: ChaosLord;720859
A super simple one might work ok for a few games but all the rest will be braindamaged.

A super simple one will work for the majority of 80's/90's PAL games. The later HD installable ones tended to be more system friendly, but then they would generally open the screen mode properly anyway.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord on January 01, 2013, 01:28:16 PM
Quote from: psxphill;720864
A super simple one will work for the majority of 80's/90's PAL games.

There is already a simple one built in to KS 3.0+ and it already does not work on a majority of PAL games.


Quote

 The later HD installable ones tended to be more system friendly, but then they would generally open the screen mode properly anyway.

Very very very few PAL games open the screen mode properly.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: blakespot on January 01, 2013, 04:10:45 PM
The HxC2001 boot menu program would always issue a reboot, making the task simpler (then live-switching a running system to a different mode, without reboot), thankfully.


bp
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord on January 01, 2013, 08:29:12 PM
Can HxC2001 handle games with more than 80 tracks?
Title: Re: Code to boot into PAL or NTSC modes?
Post by: Jeff_HxC on January 01, 2013, 09:21:49 PM
Quote from: ChaosLord;720921
Can HxC2001 handle games with more than 80 tracks?


Yes up to 255 tracks.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: Jeff_HxC on January 01, 2013, 09:23:59 PM
Regarding the 50Hz/60Hz i take the lazy way : Add Degrader into the boot script.

http://hxc2001.com/download/floppy_drive_emulator/AUTOBOOT_Amiga_WithDegrader.zip

Waiting for feedback.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: JimDrew on January 01, 2013, 09:53:18 PM
Either add a toggle switch to Agnus' PAL/NTSC jumper, or if you are using OS3.x (maybe 2.x as well), just hold down the mouse button while booting and select NTSC or PAL.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: ChaosLord on January 01, 2013, 09:54:10 PM
Quote from: Jeff_HxC;720929
Yes up to 255 tracks.
:laugh1:
That should pretty well cover it. :)

I like the sound of your device.  It sounds like it could be a more reliable alternative to WHDLoad, depending on how well its coded, designed and so forth.

I don't really know anything about it yet but I am definitely thinking of getting 1 or 3 of them.
Title: Re: Code to boot into PAL or NTSC modes?
Post by: blakespot on January 02, 2013, 12:51:12 AM
Quote from: Jeff_HxC;720932
Regarding the 50Hz/60Hz i take the lazy way : Add Degrader into the boot script.

http://hxc2001.com/download/floppy_drive_emulator/AUTOBOOT_Amiga_WithDegrader.zip

Waiting for feedback.


What is this? Please explain!



bp
Title: Re: Code to boot into PAL or NTSC modes?
Post by: blakespot on January 02, 2013, 12:51:54 AM
Quote from: JimDrew;720935
Either add a toggle switch to Agnus' PAL/NTSC jumper, or if you are using OS3.x (maybe 2.x as well), just hold down the mouse button while booting and select NTSC or PAL.


Boot menu in ROM works for little.



bp
Title: Re: Code to boot into PAL or NTSC modes?
Post by: Jeff_HxC on January 02, 2013, 05:07:17 AM
Quote from: blakespot;720950
What is this? Please explain!



bp


Why not just try it ?
<> ;)