Running Lemmings with the Amiga music patch

Discuss development specific to the Pi version of ADFFS
Post Reply
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

Running Lemmings with the Amiga music patch

Post by Vanfanel »

NOTE: This post is about an "altered" version of Lemmings. It has no relation to the normal version, which works VERY well with ADDFS on the Pi.

Hi Jon et all,

I used to play Lemmings on Risc OS on the Pi with the original Amiga music, which is far better. But my method does not work as it used to, I believe since 26bit module support was added. I know it must be something easy to fix, but I don't know how exactly.
What this method/patch does is loading QTMmini, then loads .mod files while the game plays.
The !Run script that used to work is like this:

Code: Select all


| !LemPatch - Original Amiga Lemmings Music on the Arc
|
IconSprites <Obey$Dir>.!Sprites
Set Lem$Dir <Obey$Dir>.^.!Lemmings
Set QTMmini$Dir <Obey$Dir>.!QTMmini
Run <Obey$Dir>.CheckGame
|
If "<QTMmini$Dir>"<>"" Then RMEnsure QTMTracker 1.45 RMLoad <QTMmini$Dir>.QTMModule
RMEnsure QTMTracker 1.45 Error Please load QTM music module v1.45 first
|
Set Lem2QTMmusic$Path <Obey$Dir>.AmigaLemMs.
|
RMLoad <Obey$Dir>.Lem2QTMmd
|
If "<Lem$Dir>"="" Then Error Now run the !Lemmings game
Run <Lem$Dir>.!Rungame

Then, !Rungame is simply the ADFFS run script for lemmings, with minor modifications because the game is installed on HDD and there's no need to load the disc image, etc:

Code: Select all


|set ADFFS$GAME <Obey$Dir>
|*ADFMount <ADFFS$GAME>.Lemmings (1991) (Krisalis Software) F1022701
ADFS
|Set Obey$Dir ADFS::0.$.!Lemmings
DIR <Obey$Dir>

Set Lem$Dir <Obey$Dir>

IF ADFFS$OSVersion>=&35000 THEN ADFRemapVideoMemory 9 80 ELSE ScreenSize 80
IF ADFFS$OSVersion<&35000 THEN echo <22><9>

RMAFree 200
|RMEnsure QTMTracker 1.43 RMLoad <ADFFS$Dir>.trackers.QTMModule
|RMEnsure MusicModule2 0.02 RMLoad <ADFFS$Dir>.trackers.MusMod2

wimpslot -min 496k -max 664k
IF ADFFS$CPUID>=&A10 THEN GOARM3JIT 0

| Correct T1 on 32bit
IF ADFFS$OSVersion>=&50000 THEN JITMEMORYA 16FC8 E5980000 E3A00C76

| Correct cursor plot code
ECHO <21>
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 243F4 E4960004 E2466909
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 243F8 E58F0078 E2466E45
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 243FC E5960000 E3A00601
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 24400 E58F0138 E5806000
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 24478 E8990007 EA036EE1
IF ADFFS$CPUID>=&A10 THEN JITMEMORYA 24540 E8890007 EA036EBC
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100004 E51F600C
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100008 E08FF006
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100010 E8990006
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100014 EAFC9118
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100018 E8990004
IF ADFFS$CPUID>=&A10 THEN MEMORYA 10001C EAFC9116
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100020 E8990007
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100024 EAFC9114
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100028 E8990003
IF ADFFS$CPUID>=&A10 THEN MEMORYA 10002C EAFC9112
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100030 E8990001
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100034 EAFC9110
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100038 E51F6040
IF ADFFS$CPUID>=&A10 THEN MEMORYA 10003C E08FF006
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100044 E8890006
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100048 EAFC913D
IF ADFFS$CPUID>=&A10 THEN MEMORYA 10004C E8890004
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100050 EAFC913B
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100054 E8890007
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100058 EAFC9139
IF ADFFS$CPUID>=&A10 THEN MEMORYA 10005C E8890003
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100060 EAFC9137
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100064 E8890001
IF ADFFS$CPUID>=&A10 THEN MEMORYA 100068 EAFC9135
ECHO <6>

<Lem$Dir>.LemBoot

IF ADFFS$OSVersion>=&35000 THEN ADFRemapVideoMemory
IF ADFFS$CPUID>=&A10 THEN GOARM3JIT
RMKill MusicModule2
Run <Lem$Dir>.LrestMouse
FX 15 0
If Lem$Speaker = 1 Then *Speaker On
If Lem$Speaker = 0 Then *Speaker Off
Unset Lem$Speaker
Unset Lem$Dir

Well, this used to work as I said, but since 26bit module support was added it stopped to work: the game freezes as soon as I try to go past the tittle screen by clicking mouse.
So, what would I have to do? Maybe loading one of the trackers included with recent ADFFS instead of QTMmini? How?

The Amiga Lemmings music patch comes from here: http://www.pi-star.co.uk
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Running Lemmings with the Amiga music patch

Post by JonAbbott »

Try using <ADFFS$Dir>.trackers.QTMModule in !Run instead of <QTMmini$Dir>.QTMModule as there is some ARMv7 unsafe code that's fixed in the ADFFS bundled version.

Provided Lem2QTMmd is ARMv7 safe and isn't dynamically allocating/unallocating RMA space, I don't see why it shouldn't continue to work.

If it still hangs, try merging the two Obey files and moving "RMLoad <Obey$Dir>.Lem2QTMmd" to occur after "IF ADFFS$CPUID>=&A10 THEN GOARM3JIT 0". This will run the new Module as a 26bit Module and use the 26bit RMA / fixup ARMv7 code issues.
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

Re: Running Lemmings with the Amiga music patch

Post by Vanfanel »

@Jon: Using <ADFFS$Dir>.trackers.QTMModule in !Run instead of <QTMmini$Dir>.QTMModule did the job! It now works again!!!! Great!!
Do you think I could send you a ready-to-use version so you can add it to the release already available? "Risc OS Lemmings with the original music", sounds good to me :)
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Running Lemmings with the Amiga music patch

Post by JonAbbott »

Sure, upload everything to the /incoming folder on the dev site.
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

Re: Running Lemmings with the Amiga music patch

Post by Vanfanel »

@Jon, I am trying to upload the ZIP file containing the version with original Amiga music but I get this:

Code: Select all

ftp> put /media/manuel/PiBoot/stuff/lemamig.zip 
local: /media/manuel/PiBoot/stuff/lemamig.zip remote: /media/manuel/PiBoot/stuff/lemamig.zip
200 Port command successful
550 Filename invalid
Any idea on what am I doing wrong here? The file DOES exist, in fact I get it using autocompletion.
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Running Lemmings with the Amiga music patch

Post by JonAbbott »

Try:

Code: Select all

lcd /media/manuel/PiBoot/stuff
cd /incoming
binary
put lemamig.zip
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

Re: Running Lemmings with the Amiga music patch

Post by Vanfanel »

@Jon: I think it's ready now in the Incoming dir! :)
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Running Lemmings with the Amiga music patch

Post by JonAbbott »

Got it, thanks.
Post Reply