Welcome, Guest. Please login or register.

Author Topic: amiga.library  (Read 2556 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
amiga.library
« on: September 12, 2006, 08:08:06 PM »
I had a thought today, while I was writing some shell scripts to automate launching classic games on my Pegasos.

It would be really cool if the core of UAE could be made into "amiga.library". There would then be "aga.library" and "ecs.library" depending on the graphics requirements of the game, and "68000.library"-"68060.library" for emulating different processors. These extra libraries would in effect be modules of amiga.library.

When a classic game is started, MorphOS' 68k emulation would kick in. If the emulation detected the custom chips were going to be used, it would automatically redirect this to amiga.library. amiga.library would be able to tell which graphics library (aga/ecs) and which processor library (68000-68060) to use.

Basically, the game would still be running in UAE. But instead of mucking about with UAE config files and shell scripts to launch the game, it would be taken care of automatically by MorphOS and amiga.library.

I don't know if this kind of thing is feasible, or even desirable. It was just a crazy idea I had :-)

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Homer

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1166
    • Show only replies by Homer
    • http://www.graingerweb.net
Re: amiga.library
« Reply #1 on: September 12, 2006, 08:10:02 PM »
Would it need 8Mb of chip ram ?  :lol:
Let X = X
{(c) Laurie Anderson}
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: amiga.library
« Reply #2 on: September 12, 2006, 08:11:59 PM »
Yes, it would use leirbag's 8MB chip ram hack :lol:

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: amiga.library
« Reply #3 on: September 12, 2006, 08:38:15 PM »
Quote
When a classic game is started, MorphOS' 68k emulation would kick in. If the emulation detected the custom chips were going to be used, it would automatically redirect this to amiga.library.

This is where it fails. To detect such access, the application needs to be started. Once custom chip access would be detected, the application would need to be frozen (Emulation can't know how to quit it in the middle of execution). So you would end up with stuck executable that could for example hold critical OS semaphore, and lock up the whole system.

Another problem is that there is no way for the emulation to know how the application was started. In fact, the emulation doesn't even know which application some code belongs to (well you could look into seglists, but lot of stuff use custom decrunchers and such which AllocMem the destination buffer). The MorphOS 68K emulation is totally transparent, there is no difference in PPC and 68K applications. Regardless, even if the emulation could idenfity the seglist, it still wouldn't know how to launch it with UAE.

However, it's very possible to have adf doubleclick to launch uae (trivial with new Ambient). That laucher could for example have UAE config database for various adfs, maybe identified with MD5SUM or filename.

Oh, and 68040.library and 68060.library names conflict with system libraries (MorphOS refuses to OpenLibrary libraries with these names to avoid compatibility issues).
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: amiga.library
« Reply #4 on: September 12, 2006, 08:49:13 PM »
Quote
Piru wrote:
Quote
When a classic game is started, MorphOS' 68k emulation would kick in. If the emulation detected the custom chips were going to be used, it would automatically redirect this to amiga.library.

This is where it fails. To detect such access, the application needs to be started. Once custom chip access would be detected, the application would need to be frozen (Emulation can't know how to quit it in the middle of execution). So you would end up with stuck executable that could for example hold critical OS semaphore, and lock up the whole system.

Would it make any difference if the amiga.library was started before the 68k app?

Quote
Piru wrote:
Another problem is that there is no way for the emulation to know how the application was started. In fact, the emulation doesn't even know which application some code belongs to (well you could look into seglists, but lot of stuff use custom decrunchers and such which AllocMem the destination buffer). The MorphOS 68K emulation is totally transparent, there is no difference in PPC and 68K applications. Regardless, even if the emulation could idenfity the seglist, it still wouldn't know how to launch it with UAE.

Hmmm, tooltype maybe? If the icon has the tooltype "classic" then it uses amiga.library.

Quote
Piru wrote:
However, it's very possible to have adf doubleclick to launch uae (trivial with new Ambient). That laucher could for example have UAE config database for various adfs, maybe identified with MD5SUM or filename.

Well, have written shell scripts to automate launching of UAE. But you still have to duplicate the script and modify it with the correct path every time you get a new game.

Quote
Piru wrote:
Oh, and 68040.library and 68060.library names conflict with system libraries (MorphOS refuses to OpenLibrary libraries with these names to avoid compatibility issues).

I did wonder that. Well, it's simple: use 680x0emu.library.

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: amiga.library
« Reply #5 on: September 12, 2006, 09:43:40 PM »
Quote
Would it make any difference if the amiga.library was started before the 68k app?

No. The concept of detecting the access fault and then lauching uae is flawed.

Quote
Hmmm, tooltype maybe? If the icon has the tooltype "classic" then it uses amiga.library.

And how would it know which icon to look into? Same problem, only this time it'd need to know which .info to look into.

If you're going to launch emulation right away, it doesn't make any difference if you have it in some "amiga.library" or if the emulation is static binary. UAE is GPL aswell, so it can't be integrated tightly to closed source project.
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: amiga.library
« Reply #6 on: September 12, 2006, 09:48:05 PM »
Ok, so it was a bad idea :-)

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Thomas

Re: amiga.library
« Reply #7 on: September 12, 2006, 10:26:43 PM »
Quote
If the icon has the tooltype "classic" then it uses amiga.library.


What's the difference between having a tool icon with "classic" tooltype and having a project icon with UAE as default tool ?

The latter is already possible (kind of). Have a look at Aminet or OS4Depot (don't remember which). Somebody wrote a set of scripts for E-UAE which lets you launch ADF files by double click. As these are only scripts they should run on all of OS3, OS4 and MOS.

And UAE can have 8MB of chip ram without any hack.

Bye,
Thomas