English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 04 June 2015, 06:26   #461
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Quote:
Originally Posted by saimon69 View Post
I tried the corrected adf and gives me a very good feeling!
that's nothing!!
sandruzzo is offline  
Old 04 June 2015, 13:02   #462
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
I have a some issues with baddies alignment. Their are not well put on sprite sheet. As you can see Rygars' weapons is not well draw.

Can someone align all baddies to byte or word?

Here the pic:

https://drive.google.com/file/d/0B03...ew?usp=sharing

sandruzzo is offline  
Old 04 June 2015, 14:21   #463
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Update Source code and exe.

Here the link:

https://drive.google.com/file/d/0B03...ew?usp=sharing
sandruzzo is offline  
Old 05 June 2015, 11:22   #464
saimon69
J.M.D - Bedroom Musician

 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 1,302
Another in-game version - improved main music, improved out of time music, added non-first high score (position hex 16), started first high score (position hex 1a, not looping will go back to 00 so not use it yet)



rygar_test_1f.zip
saimon69 is offline  
Old 05 June 2015, 18:19   #465
Konrad
Registered User
Konrad's Avatar
 
Join Date: Apr 2002
Location: Germany
Age: 39
Posts: 581
Had a look at the adf in WinUAE. Altough there are some bugs, it's a good start IMO.
Konrad is offline  
Old 05 June 2015, 22:51   #466
trydowave
Registered User
trydowave's Avatar
 
Join Date: Jan 2010
Location: N/A
Posts: 824
cant get this adf to boot
trydowave is offline  
Old 05 June 2015, 23:02   #467
Konrad
Registered User
Konrad's Avatar
 
Join Date: Apr 2002
Location: Germany
Age: 39
Posts: 581
It's not bootable. You have to start it from workbench.
Konrad is offline  
Old 06 June 2015, 12:43   #468
trydowave
Registered User
trydowave's Avatar
 
Join Date: Jan 2010
Location: N/A
Posts: 824
k cheers
trydowave is offline  
Old 06 June 2015, 12:46   #469
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
I know there are some bugs, I'm working on it. I still need corrected baddies' sheet
sandruzzo is offline  
Old 06 June 2015, 13:06   #470
trydowave
Registered User
trydowave's Avatar
 
Join Date: Jan 2010
Location: N/A
Posts: 824
I normally use my Real amigas these days but unfortunately I have them in storage as im moving.

Been trying my old Winuae configs. Its been a while since ive used them so I don't know if its something wrong that im doing but when I tried to load the exe I get this message:

RygarExe
Program failed (error #87000004).
Wait for disk activity to finish.

Anyone know how to fix this?

Cheers
trydowave is offline  
Old 06 June 2015, 13:47   #471
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,599
The process received an unexpected DOS packet.

This may happen when you start a program from Workbench via its default icon, but the program is not prepared to be started from Workbench. For Rygar this is true. It doesn't handle a WorkbenchMsg. You must start it from the shell.
phx is offline  
Old 06 June 2015, 13:53   #472
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Quote:
Originally Posted by phx View Post
The process received an unexpected DOS packet.

This may happen when you start a program from Workbench via its default icon, but the program is not prepared to be started from Workbench. For Rygar this is true. It doesn't handle a WorkbenchMsg. You must start it from the shell.
How can make it start from Wb?
sandruzzo is offline  
Old 06 June 2015, 14:16   #473
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,599
On startup, check if the program was started from Workbench (pr_CLI will be zero). When started from Workbench, receive the WBStartupMsg via the process' MsgPort:
Code:
        move.l  (EXECBASE).w,a6
        move.l  ThisTask(a6),a2
        cmp.b   #NT_PROCESS,LN_TYPE(a2)
        bne     .2
        tst.l   pr_CLI(a2)
        bne     .2

        ; started from Workbench: get WBStartupMsg
.1:     lea     pr_MsgPort(a2),a0
        jsr     WaitPort(a6)
        lea     pr_MsgPort(a2),a0
        jsr     GetMsg(a6)
        move.l  d0,WBStartupMsg
        beq     .1

.2: ...
On exit, reply the WBStartupMsg back to Workbench.
Code:
        ; reply WB-message
.1:     move.l  WBStartupMsg,d0
        beq     .2
        move.l  d0,a1
        jsr     Forbid(a6)
        jsr     ReplyMsg(a6)

.2:     ...
The Forbid() makes sure that the message is not replied before the process has finished.

Last edited by phx; 06 June 2015 at 14:17. Reason: typo
phx is offline  
Old 06 June 2015, 14:39   #474
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Quote:
Originally Posted by phx View Post
On startup, check if the program was started from Workbench (pr_CLI will be zero). When started from Workbench, receive the WBStartupMsg via the process' MsgPort:
Code:
        move.l  (EXECBASE).w,a6
        move.l  ThisTask(a6),a2
        cmp.b   #NT_PROCESS,LN_TYPE(a2)
        bne     .2
        tst.l   pr_CLI(a2)
        bne     .2

        ; started from Workbench: get WBStartupMsg
.1:     lea     pr_MsgPort(a2),a0
        jsr     WaitPort(a6)
        lea     pr_MsgPort(a2),a0
        jsr     GetMsg(a6)
        move.l  d0,WBStartupMsg
        beq     .1

.2: ...
On exit, reply the WBStartupMsg back to Workbench.
Code:
        ; reply WB-message
.1:     move.l  WBStartupMsg,d0
        beq     .2
        move.l  d0,a1
        jsr     Forbid(a6)
        jsr     ReplyMsg(a6)

.2:     ...
The Forbid() makes sure that the message is not replied before the process has finished.
Thanks mate!
sandruzzo is offline  
Old 06 June 2015, 15:12   #475
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Did I not working yet. Doesn't start from wb. it seems to wait message when it start from wb

About Gfx, someone can help me to align baddies' frames?

Last edited by TCD; 06 June 2015 at 19:28. Reason: Back-to-back posts merged.
sandruzzo is offline  
Old 06 June 2015, 18:54   #476
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,599
Quote:
Originally Posted by sandruzzo View Post
Did I not working yet. Doesn't start from wb. it seems to wait message when it start from wb
Then you made a mistake somewhere.

I tried to implement WB-support into your source myself now. And the game starts without a software failure. But the graphics are corrupted, because the files were not found.

That was my fault. I forgot to tell you that you have to set the current directory to the program-icon's directory when starting from Workbench. Setting the current directory is not required when starting from CLI.

You can determine the program's directory lock from the wa_Lock-field of the first WBArg, like this:
Code:
        move.l  d0,WBStartupMsg
        beq     .1
        
        ; set current directory
        move.l  d0,a3
        move.l  sm_ArgList(a3),d0
        beq     .2
        move.l  d0,a0
        move.l  wa_Lock(a0),d1
        move.l  DosBase,a6
        jsr     -126(a6)                        ; CurrentDir
Now the program is able to find all its files, even when started from WB.

It follows a complete diff of my changes:
Code:
--- RygarSource.asm.orig    2015-06-04 12:59:57.000000000 +0200
+++ RygarSource.asm    2015-06-06 18:42:48.000000000 +0200
@@ -5,9 +5,12 @@
 ;---   Includes   ----
 
     include exec/types.i
+    include    exec/execbase.i
     include    hardware/custom.i
     include    hardware/dmabits.i
     include    dos/dos.i
+    include    dos/dosextens.i
+    include    workbench/startup.i
     include    gamestruct.i
     
      
@@ -126,10 +129,33 @@
     move.l     4.w,a6
     clr.l     d0
     move.l     #DosName,a1
-    jsr     -408(a6)            ; open gfx library
+    jsr     -408(a6)            ; open dos library
     move.l    d0,DosBase
 
-    move.l    4.w,a6
+    move.l    ThisTask(a6),a2
+    cmp.b    #NT_PROCESS,LN_TYPE(a2)
+    bne    .2
+    tst.l    pr_CLI(a2)
+    bne    .2
+
+    ; get WB-message
+.1    lea    pr_MsgPort(a2),a0
+    jsr    -384(a6)            ; WaitPort
+    lea    pr_MsgPort(a2),a0
+    jsr    -372(a6)            ; GetMsg
+    move.l    d0,WBStartupMsg
+    beq    .1
+
+    ; set current directory
+    move.l    d0,a3
+    move.l    sm_ArgList(a3),d0
+    beq    .2
+    move.l    d0,a0
+    move.l    wa_Lock(a0),d1
+    move.l    DosBase,a6
+    jsr    -126(a6)            ; CurrentDir
+
+.2    move.l    4.w,a6
     clr.l    d0
     move.l     #gfxname,a1
     jsr     -408(a6)            ; open gfx library
@@ -2443,8 +2469,15 @@
 ;***   Release all Resources   ***
 ReleaseResources:
     movem.l    d0-a6,-(sp)
-    
-    movem.l    (sp)+,d0-a6
+
+    move.l    4.w,a6
+    move.l    WBStartupMsg,d0
+    beq    .1
+    move.l    d0,a1
+    jsr    -132(a6)        ; Forbid
+    jsr    -378(a6)        ; ReplyMsg
+
+.1    movem.l    (sp)+,d0-a6
     rts
 
 
@@ -2495,14 +2528,14 @@
     MOVE.L    #MODE_OLDFILE,D2    
     MOVE.L    DosBase(PC),A6
     JSR    -$1E(A6)    ; LVOOpen - "Apri" il file
-    MOVE.L    D0,FileHandle    ; Salva il suo handle
+    MOVE.L    D0,File_Handle    ; Salva il suo handle
     BEQ.W    ErrorOpen    ; Se d0 = 0 allora c'e' un errore!
 
 ;---   file lock   ---
     move.l    FileName(pc),d1    
     moveq    #ACCESS_READ,d2    
     jsr    -$54(a6)    ; lock del file
-    move.l    d0,FileLock
+    move.l    d0,File_Lock
     beq.w    ErroreLock    ; d0 = 0? Allora errore!
 
 ;---   Alloc mem file info block
@@ -2514,7 +2547,7 @@
     beq.s    ErroreAlFib    ; d0=0? Allora errore!
 
 ;---   Get File Info  ---
-    move.l    FileLock(PC),d1    ; lock ptr in d1 per examine
+    move.l    File_Lock(PC),d1; lock ptr in d1 per examine
     move.l    FibAdr(PC),d2    ; File Info Block per examine
     MOVE.L    DosBase(PC),A6
     jsr    -$66(a6)    ; examine che riempie il buffer fib ($104 byte) 
@@ -2544,7 +2577,7 @@
     st.b    FreeMemFlag    ; Ricordiamoci di fare il freemem
 
 ;---   Read File   ---    
-    MOVE.L    FileHandle(PC),D1 ; FileHandle in d1 per il Read 
+    MOVE.L    File_Handle(PC),D1 ; FileHandle in d1 per il Read 
     MOVE.L    FileAdr(PC),D2    ; Indirizzo Destinazione in d2 
     MOVE.L    SizeFile(PC),D3    ; Lunghezza del file (ESATTA!) 
     MOVE.L    DosBase(PC),A6
@@ -2586,13 +2619,13 @@
 ;***   LOAD FILE SUB-ROUTINES   ***  
 CloseFile:
     MOVE.L    DosBase(PC),A6
-    MOVE.L    FileHandle(pc),D1     ; FileHandle in d1
+    MOVE.L    File_Handle(pc),D1     ; FileHandle in d1
     JSR    -$24(A6)        ; LVOClose - chiudi il file.
     rts
 
 UnlockFile:
     MOVE.L    DosBase(PC),A6
-    move.l    FileLock(PC),d1        ; lock ptr in d1 per unlock
+    move.l    File_Lock(PC),d1    ; lock ptr in d1 per unlock
     jsr    -$5a(a6)        ; Unlock del file
     rts
 
@@ -2609,6 +2642,7 @@
 DosName            dc.b    "dos.library",0
 gfxname:        dc.b     "graphics.library",0
 DosBase            dc.l    0
+WBStartupMsg        dc.l    0
 old_copper        dc.l     0    
 old_dmaconr        dc.l    0
 old_intenar        dc.l    0
@@ -2690,10 +2724,10 @@
 
 SaveFileSize    dc.l    0
 SaveLoadedFile    dc.l    0
-FileHandle    dc.l    0
+File_Handle    dc.l    0
 TypeOfMem    dc.l    0
 FileName    dc.l    0
-FileLock    dc.l    0
+File_Lock    dc.l    0
 FibAdr        dc.l    0
 SizeFile    dc.l    0
 FileAdr        dc.l    0
Note that I also had to rename FileHandle and FileLock because the symbols conflict with structure definitions from dos/dosextens.i.
phx is offline  
Old 08 June 2015, 06:53   #477
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
[QUOTE=phx;1023895]Then you made a mistake somewhere.

I tried to implement WB-support into your source myself now. And the game starts without a software failure. But the graphics are corrupted, because the files were not found.

That was my fault. I forgot to tell you that you have to set the current directory to the program-icon's directory when starting from Workbench. Setting the current directory is not required when starting from CLI.

You can determine the program's directory lock from the wa_Lock-field of the first WBArg, like this:
Code:
        move.l  d0,WBStartupMsg
        beq     .1
        
        ; set current directory
        move.l  d0,a3
        move.l  sm_ArgList(a3),d0
        beq     .2
        move.l  d0,a0
        move.l  wa_Lock(a0),d1
        move.l  DosBase,a6
        jsr     -126(a6)                        ; CurrentDir
Now the program is able to find all its files, even when started from WB.

It follows a complete diff of my changes:
Code:
--- RygarSource.asm.orig    2015-06-04 12:59:57.000000000 +0200
+++ RygarSource.asm    2015-06-06 18:42:48.000000000 +0200
@@ -5,9 +5,12 @@
 ;---   Includes   ----
 
     include exec/types.i
+    include    exec/execbase.i
     include    hardware/custom.i
     include    hardware/dmabits.i
     include    dos/dos.i
+    include    dos/dosextens.i
+    include    workbench/startup.i
     include    gamestruct.i
     
      
@@ -126,10 +129,33 @@
     move.l     4.w,a6
     clr.l     d0
     move.l     #DosName,a1
-    jsr     -408(a6)            ; open gfx library
+    jsr     -408(a6)            ; open dos library
     move.l    d0,DosBase
 
-    move.l    4.w,a6
+    move.l    ThisTask(a6),a2
+    cmp.b    #NT_PROCESS,LN_TYPE(a2)
+    bne    .2
+    tst.l    pr_CLI(a2)
+    bne    .2
+
+    ; get WB-message
+.1    lea    pr_MsgPort(a2),a0
+    jsr    -384(a6)            ; WaitPort
+    lea    pr_MsgPort(a2),a0
+    jsr    -372(a6)            ; GetMsg
+    move.l    d0,WBStartupMsg
+    beq    .1
+
+    ; set current directory
+    move.l    d0,a3
+    move.l    sm_ArgList(a3),d0
+    beq    .2
+    move.l    d0,a0
+    move.l    wa_Lock(a0),d1
+    move.l    DosBase,a6
+    jsr    -126(a6)            ; CurrentDir
+
+.2    move.l    4.w,a6
     clr.l    d0
     move.l     #gfxname,a1
     jsr     -408(a6)            ; open gfx library
@@ -2443,8 +2469,15 @@
 ;***   Release all Resources   ***
 ReleaseResources:
     movem.l    d0-a6,-(sp)
-    
-    movem.l    (sp)+,d0-a6
+
+    move.l    4.w,a6
+    move.l    WBStartupMsg,d0
+    beq    .1
+    move.l    d0,a1
+    jsr    -132(a6)        ; Forbid
+    jsr    -378(a6)        ; ReplyMsg
+
+.1    movem.l    (sp)+,d0-a6
     rts
 
 
@@ -2495,14 +2528,14 @@
     MOVE.L    #MODE_OLDFILE,D2    
     MOVE.L    DosBase(PC),A6
     JSR    -$1E(A6)    ; LVOOpen - "Apri" il file
-    MOVE.L    D0,FileHandle    ; Salva il suo handle
+    MOVE.L    D0,File_Handle    ; Salva il suo handle
     BEQ.W    ErrorOpen    ; Se d0 = 0 allora c'e' un errore!
 
 ;---   file lock   ---
     move.l    FileName(pc),d1    
     moveq    #ACCESS_READ,d2    
     jsr    -$54(a6)    ; lock del file
-    move.l    d0,FileLock
+    move.l    d0,File_Lock
     beq.w    ErroreLock    ; d0 = 0? Allora errore!
 
 ;---   Alloc mem file info block
@@ -2514,7 +2547,7 @@
     beq.s    ErroreAlFib    ; d0=0? Allora errore!
 
 ;---   Get File Info  ---
-    move.l    FileLock(PC),d1    ; lock ptr in d1 per examine
+    move.l    File_Lock(PC),d1; lock ptr in d1 per examine
     move.l    FibAdr(PC),d2    ; File Info Block per examine
     MOVE.L    DosBase(PC),A6
     jsr    -$66(a6)    ; examine che riempie il buffer fib ($104 byte) 
@@ -2544,7 +2577,7 @@
     st.b    FreeMemFlag    ; Ricordiamoci di fare il freemem
 
 ;---   Read File   ---    
-    MOVE.L    FileHandle(PC),D1 ; FileHandle in d1 per il Read 
+    MOVE.L    File_Handle(PC),D1 ; FileHandle in d1 per il Read 
     MOVE.L    FileAdr(PC),D2    ; Indirizzo Destinazione in d2 
     MOVE.L    SizeFile(PC),D3    ; Lunghezza del file (ESATTA!) 
     MOVE.L    DosBase(PC),A6
@@ -2586,13 +2619,13 @@
 ;***   LOAD FILE SUB-ROUTINES   ***  
 CloseFile:
     MOVE.L    DosBase(PC),A6
-    MOVE.L    FileHandle(pc),D1     ; FileHandle in d1
+    MOVE.L    File_Handle(pc),D1     ; FileHandle in d1
     JSR    -$24(A6)        ; LVOClose - chiudi il file.
     rts
 
 UnlockFile:
     MOVE.L    DosBase(PC),A6
-    move.l    FileLock(PC),d1        ; lock ptr in d1 per unlock
+    move.l    File_Lock(PC),d1    ; lock ptr in d1 per unlock
     jsr    -$5a(a6)        ; Unlock del file
     rts
 
@@ -2609,6 +2642,7 @@
 DosName            dc.b    "dos.library",0
 gfxname:        dc.b     "graphics.library",0
 DosBase            dc.l    0
+WBStartupMsg        dc.l    0
 old_copper        dc.l     0    
 old_dmaconr        dc.l    0
 old_intenar        dc.l    0
@@ -2690,10 +2724,10 @@
 
 SaveFileSize    dc.l    0
 SaveLoadedFile    dc.l    0
-FileHandle    dc.l    0
+File_Handle    dc.l    0
 TypeOfMem    dc.l    0
 FileName    dc.l    0
-FileLock    dc.l    0
+File_Lock    dc.l    0
 FibAdr        dc.l    0
 SizeFile    dc.l    0
 FileAdr        dc.l    0
Note that I also had to rename FileHandle and FileLock because the symbols conflict with structure definitions from dos/dosextens.i.[/QUO

Thanks Mate fpr helps. I saw the conflict with symbols.
sandruzzo is offline  
Old 08 June 2015, 10:22   #478
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Update Done, here the adf:

https://drive.google.com/file/d/0B03...ew?usp=sharing
sandruzzo is offline  
Old 08 June 2015, 10:45   #479
Arnie
R.I.P Smudge 18-08-16

Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 62
Posts: 3,908
Quote:
Originally Posted by sandruzzo View Post
That links to rygar_sprites.iff?
Arnie is offline  
Old 08 June 2015, 12:00   #480
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,779
Quote:
Originally Posted by Arnie View Post
That links to rygar_sprites.iff?
It's the adf.

Here to .iff:

https://drive.google.com/file/d/0B03...ew?usp=sharing
sandruzzo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
rygar? Prosonic support.Games 7 09 June 2013 14:18
two more that borrow heavily from Rygar & Black Tiger NfernalNfluence Nostalgia & memories 5 30 September 2012 18:57
SCIENCE 451-RYGAR: same disks mrodfr project.TOSEC (amiga only) 0 26 December 2006 15:38
Wordworth conversion vertigo support.Apps 5 09 December 2003 14:46

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.15099 seconds with 16 queries