English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Contest

 
 
Thread Tools
Old 23 June 2019, 03:47   #1121
Frog
Junior Member

Frog's Avatar
 
Join Date: Aug 2001
Location: France
Posts: 1,295
hello, i don't know if it can be useful but why do you want to use ARJ packer ?
There's LZX on Amiga, it was even used by microsoft for their .CAB files.
Unfortunately, i don't know if there's an asm source code for unpacking .lzx files, i've find a c++ source code if you're interested : https://github.com/ipr/qUnLZX
There's also an xpklibrary called xpkSHRI that compress quite well, there's even an update version called xpkSHR3 but i can't find a download link.
I've find a website with C++ source code of SHR3 : HERE
As Don Adam told you HERE, the best result seems to be the atari PackFire version of the LZMA available on Pouet, there's a comparison of Packfire and Shrinkler on A.D.A.
I remember that to gain hd space, i packed all my modules with the xpkSQSH library
There's also some ARJ depacker on this Atari forum

Last edited by Frog; 23 June 2019 at 04:02.
Frog is offline  
Old 26 June 2019, 23:01   #1122
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,247
There's nothing like a nice big bonanza.

[ Show youtube player ]

Rounds 1-12 completed... working on 13 for the next few days, then off for a week to Butlins.

Round 13 needs extra care as it features the Riders on the Big Rhinos throwing hammers.

Geezer
mcgeezer is offline  
Old 26 June 2019, 23:13   #1123
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 1,929
Looks awesome! That sky goes so well with the mountains colours are spot on!

Which Butlins you headed Skeggy? Haven’t been back for a couple of years, got lil doggy now so don’t trust any dodgy kennels to ‘look after’ him!
Amigajay is offline  
Old 26 June 2019, 23:17   #1124
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,247
Quote:
Originally Posted by Amigajay View Post
Looks awesome! That sky goes so well with the mountains colours are spot on!

Which Butlins you headed Skeggy? Haven’t been back for a couple of years, got lil doggy now so don’t trust any dodgy kennels to ‘look after’ him!
Yeah, there's a fair bit of gradient in the mountains too which makes it stand our nicely.

No, I'm off to the Butlins in Minehead, bloody long drive from Sunderland.... the bairn wanted to go to Thomas land so stopping off there on the way down to break up the drive.
mcgeezer is offline  
Old 26 June 2019, 23:50   #1125
Amigajay
Registered User
 
Join Date: Jan 2010
Location: >
Posts: 1,929
Quote:
Originally Posted by mcgeezer View Post
Yeah, there's a fair bit of gradient in the mountains too which makes it stand our nicely.

No, I'm off to the Butlins in Minehead, bloody long drive from Sunderland.... the bairn wanted to go to Thomas land so stopping off there on the way down to break up the drive.
Yeah is a very long drive! Went to Minehead Butlins once in the 90s with my mate and family when i lives in Devon, i know exactly when it was because i bought the CU Amiga mag with the Settlers demo on it!
Amigajay is offline  
Old 27 June 2019, 00:18   #1126
Reido
Registered User

 
Join Date: Feb 2013
Location: Dublin/Ireland
Posts: 292
Thumbs up

Excellent progress, SFX sound great! Enjoy your holliers
Reido is offline  
Old 28 June 2019, 22:28   #1127
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,247
Quote:
Originally Posted by Reido View Post
Excellent progress, SFX sound great! Enjoy your holliers
Thanks buddy.

Here's some Rhino Riders too throwing some big ass hammers.

[ Show youtube player ]


I'm pretty proud of my sprite engine here.... notice how i can kill the rider independent of the Rhino and vice versa...
It's quite straight forward to do, most of the time was me figuring out the trajectory of the hammer.

Thankfully I found this which did the job in seconds.

https://www.pouet.net/prod.php?which=14718

Geezer
mcgeezer is offline  
Old 29 June 2019, 00:46   #1128
Hache
Registered User
Hache's Avatar
 
Join Date: Jan 2013
Location: Buenos Aires, Argentina
Posts: 156
Amazing job!!! I'll be trying it later tonight...

CONGRATULATIONS!!!!
Hache is offline  
Old 29 June 2019, 14:15   #1129
Foul
Registered User

Foul's Avatar
 
Join Date: Jun 2009
Location: Perigueux/France
Age: 44
Posts: 1,389
Send a message via ICQ to Foul Send a message via MSN to Foul
Amazing job ! as usual...
Foul is offline  
Old 05 July 2019, 15:02   #1130
JuanLuis
Registered User
 
Join Date: Dec 2018
Location: Málaga
Posts: 14
Quote:
Originally Posted by mcgeezer View Post
Could someone point me in the direction of the ARJ packer please? I'm having a little trouble finding it on Aminet.

I'll pack the files tonight and see what the outcome is.
McGeezer, there are some other alternatives before using complex compressors.

I have taken a look on RygarEAB11.adf contents and I could see several details.

- Most of the characters in Rygar have flipped/mirrored poses. Store on disk one of the poses and construct mirrored/flipped pose while loading.

- I have seen files ry_bg_levN.RNC that contains background of each level in IFF format. You could store these background in tile format in the same way that foreground.

- There are many files on disk. Amiga and all computers waste space on last block. This problem is bigger specially if we have many small files. You can store resources into a big file instead of many small files.

I know a powerful compressor requires less efforts, but you should consider these points if compressors don't solve the problem.

Thanks for your efforts. The game looks wonderful.
JuanLuis is offline  
Old 05 July 2019, 18:07   #1131
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,247
Quote:
Originally Posted by JuanLuis View Post
McGeezer, there are some other alternatives before using complex compressors.

I have taken a look on RygarEAB11.adf contents and I could see several details.

- Most of the characters in Rygar have flipped/mirrored poses. Store on disk one of the poses and construct mirrored/flipped pose while loading.

- I have seen files ry_bg_levN.RNC that contains background of each level in IFF format. You could store these background in tile format in the same way that foreground.

- There are many files on disk. Amiga and all computers waste space on last block. This problem is bigger specially if we have many small files. You can store resources into a big file instead of many small files.

I know a powerful compressor requires less efforts, but you should consider these points if compressors don't solve the problem.

Thanks for your efforts. The game looks wonderful.

Thanks Juanluis,

There’s some great ideas here - i had not considered flipping the sprites and i could probably gain 50kb by doing that so will do it.

I had considered boxing up the small files to save space as well but i only gain with the game samples, each round contains 3 files so i guess i could package those as well but it would be a fair bit of work.

For the tiled backgrounds i’d need to reconstruct these at load time, i might be able to do it as i played with a python tool to do it previously - that would br a fair amount of work though and might not give a huge gain as i was careful to place 16x16 block alignment in the backgrounds so that the packer would give max compression.

All great ideas and thanks for the feedback!

Geezer

@JuanLuis - I've just had a further thought based on your idea that would save me a further 30Kb.... I have a pre-calculated version of the hardware sprites saved onto disk (hwconv.dat) as well that can totally be generated in memory.

I estimate now a saving of around 80Kb on disk leaving around 100Kb which is brilliant!!!

Last edited by mcgeezer; 05 July 2019 at 19:54.
mcgeezer is offline  
Old 05 July 2019, 23:10   #1132
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,247
Finally debugged the bloody Dragons code and now they're working.

I had a bug in the code when the Rider throws the hammer which wiped out part of the hardware sprites.... took me bloody ages to debug....why?...

...because for some bizarre reason... WinUAE memory watch points don't work with Z3 fast ram that for some reason was configured.

[ Show youtube player ]

The game is insanely difficult up at these rounds...

Geezer

Last edited by mcgeezer; 05 July 2019 at 23:39. Reason: Just to clarify - it was my shit code in the first place and nothing to do with WINUAE really.
mcgeezer is offline  
Old 05 July 2019, 23:17   #1133
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 1,823
Quote:
Originally Posted by mcgeezer View Post
... WinUAE memory watch points don't work with Z3 fast ram ..
So I'm not only me! I've reverted to Z2 mem in my test-bench for this very reason.
But not always happen, so I can't give to Toni a proper report..
ross is offline  
Old 06 July 2019, 01:01   #1134
JuanLuis
Registered User
 
Join Date: Dec 2018
Location: Málaga
Posts: 14
Quote:
Originally Posted by mcgeezer View Post
Finally debugged the bloody Dragons code and now they're working.

I had a bug in the code when the Rider throws the hammer which wiped out part of the hardware sprites.... took me bloody ages to debug....why?...

...because for some bizarre reason... WinUAE memory watch points don't work with Z3 fast ram that for some reason was configured.

[ Show youtube player ]

The game is insanely difficult up at these rounds...

Geezer

I have also seen that problem. How do you allocate the memory for gfx and music resources? In C language, you can specify the type of memory you want to allocate in malloc sentence. If Amiga has both types of memory (Chip and Fast) memory allocation library could give you memory of wrong type.
JuanLuis is offline  
Old 06 July 2019, 01:13   #1135
Antiriad_UK
Registered User

 
Join Date: Mar 2019
Location: Birmingham, UK
Posts: 64
Quote:
Originally Posted by mcgeezer View Post
Thanks Juanluis,

There’s some great ideas here - i had not considered flipping the sprites and i could probably gain 50kb by doing that so will do it.

I had considered boxing up the small files to save space as well but i only gain with the game samples, each round contains 3 files so i guess i could package those as well but it would be a fair bit of work.

For the tiled backgrounds i’d need to reconstruct these at load time, i might be able to do it as i played with a python tool to do it previously - that would br a fair amount of work though and might not give a huge gain as i was careful to place 16x16 block alignment in the backgrounds so that the packer would give max compression.

All great ideas and thanks for the feedback!

Geezer

@JuanLuis - I've just had a further thought based on your idea that would save me a further 30Kb.... I have a pre-calculated version of the hardware sprites saved onto disk (hwconv.dat) as well that can totally be generated in memory.

I estimate now a saving of around 80Kb on disk leaving around 100Kb which is brilliant!!!
90% not relevant but these suggestions remind me of this blog post from Uridium I found recently.

http://uridiumauthor.blogspot.com/20...-routines.html

Most of these ideas would never have occurred to me and just cements in my mind that I will always be in "just ok" in programming (good job it's just a side hobby) and to just use the wisdom of others when you can
Antiriad_UK is offline  
Old 06 July 2019, 02:00   #1136
lmimmfn
Registered User

 
Join Date: May 2018
Location: Mullingar
Posts: 44
@mcgeezer,would you ever consider doing a conversion of the original Contra on the Amiga? Just looking at a stream tonight and it could be done arcade perfect. Your engine would be perfect apart from the 3D sections.
lmimmfn is offline  
Old 06 July 2019, 16:56   #1137
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,247
Quote:
Originally Posted by lmimmfn View Post
@mcgeezer,would you ever consider doing a conversion of the original Contra on the Amiga? Just looking at a stream tonight and it could be done arcade perfect. Your engine would be perfect apart from the 3D sections.
I don't think so because it looks like Contra was already released on the Amiga.

[ Show youtube player ]

Geezer
mcgeezer is offline  
Old 06 July 2019, 18:28   #1138
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,247
Well, thanks to that idea by JuanLuis I have saved myself a decent 40Kb of disk space.

Here's another video... it's a before and after job. The game loads only sprite assets that are either facing or are facing right, I have removed the left facing sprites to save on disk space. You'll see I go into the AR cart and look up the address where the sprites have loaded... then i'll run the game and take another look and you'll see all the mirrored copies of the sprites have been created.

[ Show youtube player ]

And in case it helps anyone here's the bits of code I wrote today for it for anyone to dismantle as they please.

Code:
; You have to make a call to create a 256 byte swap table on init.
; bsr GENERATE_BYTE_SWAP_TABLE 


; Input d1=longword
; Output d1=longword reversed
REVERSE_LONGWORD:
	movem.l	d0/d2/a0,-(a7)
	lea	BYTE_REVERSE_TAB(a4),a0

	moveq	#0,d0
	move.b	d1,d0
	move.b	(a0,d0),d2
	lsr.l	#8,d1
	lsl.l	#8,d2
	
	moveq	#0,d0
	move.b	d1,d0
	move.b	(a0,d0),d2
	lsr.l	#8,d1
	lsl.l	#8,d2
	
	moveq	#0,d0
	move.b	d1,d0
	move.b	(a0,d0),d2
	lsr.l	#8,d1
	lsl.l	#8,d2
	
	moveq	#0,d0
	move.b	d1,d0
	move.b	(a0,d0),d2
	move.l	d2,d1
	movem.l	(a7)+,d0/d2/a0
	
	rts
	
	
GENERATE_BYTE_SWAP_TABLE:
	movem.l	d1-d7/a0,-(a7)
	move.l	#256-1,d7
	
	lea	BYTE_REVERSE_TAB(a4),a0
	moveq	#0,d6
	
.loop:	move.l	d6,d0
	bsr	.swap
	move.b	d0,(a0)+
	addq.b	#1,d6
	dbf	d7,.loop
	movem.l	(a7)+,d1-d7/a0
	bra	.exit

;d0 =byte to swap
.swap:
	moveq	#0,d1
	moveq	#0,d2
	
	move.b	d0,d1
	move.b	d0,d2

;;	
	and.b	#$f0,d1			; (b & 0xF0) >> 4;
	lsr.b	#4,d1		
	and.b	#$f,d2			; (b & 0x0F) << 4;
	lsl.b	#4,d2
	or.b 	d1,d2

	
	move.b	d2,d0	
	move.b	d0,d1
	move.b	d0,d2
; 	
	and.b	#$CC,d1			; (b & 0xCC) >> 2;
	lsr.b	#2,d1	
	and.b	#$33,d2			; (b & 0x33) << 2;
	lsl.b	#2,d2
	or.b 	d1,d2			
	move.b	d2,d0

	move.b	d2,d0	
	move.b	d0,d1
	move.b	d0,d2
; 	
	and.b	#$AA,d1			; (b & 0xAA) >> 1;
	lsr.b	#1,d1	
	and.b	#$55,d2			; (b & 0x55) << 1;
	lsl.b	#1,d2
	or.b 	d1,d2			
	move.b	d2,d0

.exit:	rts

CREATE_MIRROR_SPRITES:
	lea	SPRITE_MIRROR_TABLE(a4),a2
.next:	moveq	#0,d0
	moveq	#0,d1
	move.w	(a2)+,d0
	bmi	.exit
	
	move.w	(a2)+,d1
	
; Get source sprite in a0
        move.l  MEMCHK0_SPRITE_POINTERS(a4),a0
        move.l  (a0,d0*8),a0

; Destination sprite in a1
        move.l  MEMCHK0_SPRITE_POINTERS(a4),a1
        move.l  (a1,d1*8),a1

	
	move.l	#(32*5)-1,d7		; 32 pixels depth by
	move.l	#ASSETS_WIDTH,d6			; 40 for bitplane length
	
.loop:
	move.l	(a0),d1
	bsr	REVERSE_LONGWORD
	move.l	d1,(a1)
	
	add.l	d6,a0
	add.l	d6,a1
	dbf	d7,.loop
	bra.s	.next
	
.exit:	rts

BYTE_REVERSE_TAB: ds.b 256
Who knows... it might help someone in the future (after all, this is the coders section )

Last edited by mcgeezer; 06 July 2019 at 18:53.
mcgeezer is offline  
Old 06 July 2019, 18:35   #1139
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,645
Quote:
Originally Posted by mcgeezer View Post
I don't think so because it looks like Contra was already released on the Amiga.

[ Show youtube player ]

Geezer

This is actually Super Contra, Part 2 of the series. The original Contra was never released on the Amiga. The NES Contra was the better version anyway.
Retro-Nerd is offline  
Old 06 July 2019, 20:02   #1140
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 49
Posts: 1,823
Quote:
Originally Posted by mcgeezer View Post
Who knows... it might help someone in the future (after all, this is the coders section )
This is my 16-bit real-time flip routine that I've inserted in Lionheart:

Code:
init16bitfliplut
    lea     fliplut(pc),a0
    moveq   #0,d3
.k  moveq   #7,d2
    move.b  d3,d0
.l  add.b   d0,d0
    roxr.b  #1,d1
    dbf     d2,.l
    move.b  d1,(a0)+
    addq.b  #1,d3
    bne.b   .k
    rts
Code:
flip16bit
    moveq   #0,d3
    lea     1(a0),a3
.l  move.b  (a3),d3
    move.b  fliplut(pc,d3.l),-(sp)
    move.b  (a0),d3
    move.w  (sp)+,d2
    move.b  fliplut(pc,d3.l),d2
    move.w  d2,(a1)+
    addq.l  #2,a0
    addq.l  #2,a3
    dbra    d0,.l
    rts

fliplut
    ds.b    256
EDIT: of course d3=0 at flip16bit() entrance, line added

Last edited by ross; 06 July 2019 at 20:24.
ross 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
Entry: Rygar AGA Edition mcgeezer Coders. Entries 75 28 February 2019 20:41
On the Ball - World Cup Edition AGA djcasey request.Old Rare Games 4 25 January 2013 12:39
On The Ball League Edition AGA , Player Manager 2 StarEye Games images which need to be WHDified 11 22 January 2010 18:21
The Vague #1 AGA-RTG edition is released ! kas1e Amiga scene 12 30 October 2007 00:27
On The Ball: World Cup Edition AGA CodyJarrett request.Old Rare Games 11 27 May 2003 06:14

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 06:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.10580 seconds with 14 queries