Main Menu

Issue with print #1 command

Started by xboxisfinished, 07 Aug, 2021, 03:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SamuraiCrow

What other extensions are in APSystem?  The AmosMusic extension should be in there too.

xboxisfinished

K. You know what? I have this AMOS Unity they are making which adds new features to AGA and such for the new hardware Vampire 4 they released to the public. Maybe this (being in alpha stage) is the reason. Do you have a complete lha I can unextract that contains AMOS already installed with all it's extensions configured (including AMCAF)? I will simply migrate my game to that and remove any code I used that works with AMOS Unity only and recode it to work with normal AMOS.

I just want to release this game and I am not going to wait patiently until the author deals with his political issues in French to resume work and help me solve it from his end.

To answer your question this is what I have in APUSystem folder:

AmosProUnity.Lib
AmosProUnityAGA.library
AmosProUnityECS.library
AmosProUnity_Compact.lib
AmosProUnity_Compiler.lib
AmosProUnity_IOPorts.Lib
AmosProUnity_Music.Lib
AmosProUnity_Request.Lib
AmosProUnity_Support.Lib
AmosPro_AMCAF.Lib
AmosPro_AMCAFUpdate.Lib
Compiler.Lib
Header_Backstart.Lib
Header_CLI.Lib

SamuraiCrow

That may be the problem!  Yes!  Frèdèric may not have tested it with old extensions.

xboxisfinished

Do you know where I can find that lha that have the entire amos installed? thanks

SamuraiCrow

Mequa's old build might be modifyable but it booted straight to Amos via Aros on Windows.  It had trouble with file transfers because it had such an ancient Aros version.

xboxisfinished


SamuraiCrow

@Hungry Horace

Didn't Hungry Horace have a full Amos install on HDF that could be unpacked on Amiga?

xboxisfinished

Do you think he will hear you?

SamuraiCrow

He's got the tapatalk app and I asked on our Discord server too.  If all you need is xor encryption, I can rewrite the save routine without AMCAF.  Just not right now.

Hungry Horace

https://cdn.discordapp.com/attachments/392453604348526595/873914531632513024/AmosProBoot.zip

Not sue if this will work without a Discord login!


Make sure to speak to Frederic about plans for AMCAF support - either recompiling the ReSourced code or adding the same commands into his own compatibility extension. I know he had plans to do this.
Quote from: KillerGorillabecause winuae is made of code and your amiga is made of stuff


xboxisfinished

Frédéric CORDIER <cordierfr@wanadoo.fr>
9:03 AM (2 hours ago)
to me

Hello.
Quick reply from my holidays week.
Amos Pro Unity is not compatible with amos professional existing plugins.
I have the AMCAF source code, but did not yet ported it to amos pro unity.
It will maybe be done later in the years, once saga graphics will be completed.

Regards.
Frédéric Cordier


SamuraiCrow

As a non-AMCAF implementation of the encryption, substitute the following for the Bank Code lines:
For C=Start(16) To Start(16)+Length(16)-2 Step 2
    Doke C, Rol.w(Xor(Deek(C),$A55A),5)
Next C


To decode the prevous encryption:
For C=Start(16) To Start(16)+Length(16)-2 Step 2
   Doke C, Xor(Ror.w(Deek(C),5),$A55A)
Next C


If it's not fast enough, assign the end expression of the for loops (everything between the To keyword to the Step keyword) to a variable and test against that inside the loop.  Also, be sure the file is loaded before you assign the expression to the value.

xboxisfinished


Hey SamuraiCrow I have issue with the code you gave me....
« on: August 09, 2021, 05:01:27 AM »
ReplyQuoteModifyModify
   First, I would like to thank you in advance for all the help you are giving me. So in this regard, thank you. Sorry to disturb you or further waste your time, I typed the code and I am facing issues with it. Please, bare with me.

For this code:

Load "dh1:amos/code/test/level0.dat", 16
Bank Code ROR.w 16, 5
Bank Code xor.w 16, $a55a
For Height=0 to 49
  For Width=0 to 49
      offset=Leek((Height*49+Width)*4+Start(16))
      LEVELGETCARD$(Width, Height)=Peek$(12001+Start(16) + Offset)==> this line always spit out syntax error for some reason. No matter what I do, it spits out syntax error. The error is on peek$. For some reason, it is happy to return to value if it is typed like this:

_retVal=Peek(12001+Start(16)+Offset) instead of Peek$. Which is why the line below this sentence works great. I am not sure what to do here.

      LEVEL(Width, Height)=Peek(Start(16)+9604+(49*Height+Width))
  Next Width


---------------------------

For this line of code:

Reserve as work bank 16, (StringLength+12001+3) And Not 3

There is no such thing as bank 16. if I type Reserve As Work BANK 16, (StringLength+12001+3) And Not 3 as you can see, I have capitlized it. Meaning BANK is invalid and will give me syntax error. If I removed bank after Reserve As Work then it compiles.

This line of code:

        Poke$(start(16)+offset),VarPtr(LevelGetCard$(Width,Height))+2

gives me type mismatch. It doesn't like VarPtr with string LevelGetCard$ and nor does it like +2 after it. How do I go about resolving this issue.

There is no such thing as Bank after Erase. It have to be Erase 16. Is this correct? Once I ran the code...it produces horribles gibberish graphics effects in the screen and resulted in full fledge crash. What advice do you have. I cannot save or load because it results in destructive jibberish in the screen followed by crashing.

Here are the codes again below:

reading
Load "dh1:amos/code/test/level0.dat", 16
Bank Code ROR.w 16, 5
Bank Code xor.w 16, $a55a
For Height=0 to 49
  For Width=0 to 49
      offset=Leek((Height*49+Width)*4+Start(16))
      LEVELGETCARD$(Width, Height)=Peek$(12001+Start(16) + Offset)
      LEVEL(Width, Height)=Peek(Start(16)+9604+(49*Height+Width))
  Next Width
Next Height
Erase Bank 16


writing
StringLength=0
For Height=0 to 49
   For Width=0 to 49
      LevelGetCard$(width, height)=LevelGetCard$(width,height)+Chr$(0)
      StringLength=StringLength+Len(LevelGetCard$(width,height))
    Next width
Next Height
Reserve as work bank 16, (StringLength+12001+3) And Not 3
Offset=12001
For Height=0 to 49
   for Width=0 to 49
        Poke$(start(16)+offset),VarPtr(LevelGetCard$(Width,Height))+2
        Loke Start(16)+(49*Height+Width)*4,offset
        offset=offset+Len(LevelGetCard$(Width,Height))
        Poke start(16)+(49*height+width)+9604, level(width,height)
   Next Width
Next Height

Bank Code xor.w 16, $a55a
Bank Code ROL.w 16, 5
save"dh1:amos/code/test/level0.dat",16
Erase bank 16

SamuraiCrow

#43
I just looked up the correct syntax at https://www.ultimateamiga.co.uk/HostedProjects/AMOSFactory/AMOSProManual/14/1405.html and it needs a few more parameters.

Peek$(address, length, chr$(0))

The length is the maximum length possible for the string so give it a sensible number like 32768 or smaller.  The address is what I previously gave you as a parameter for the start of the string.

xboxisfinished

Quote from: SamuraiCrow on 10 Aug, 2021, 01:53 AM
I just looked up the correct syntax at https://www.ultimateamiga.co.uk/HostedProjects/AMOSFactory/AMOSProManual/14/1405.html and it needs a few more parameters.

Peek$(address, length, chr$(0))

The length is the maximum length possible for the string so give it a sensible number like 32768 or smaller.  The address is what I previously gave you as a parameter for the start of the string.


So I should type it like this:

Peek$(12001+Start(16) + Offset, stringlength, chr$(0)) instead of Peek$(12001+Start(16) + Offset)? What about reserve as work bank 16 where the word bank doesn't exist after work and what about type mismatch error and about jibbering graphics and crashing the entire system?