![]() |
![]() |
#1141 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
I haven't tested your code Ross but it looks like it breaks the stack? |
|
![]() |
![]() |
#1142 | |
J.M.D - Bedroom Musician
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,596
|
Quote:
![]() ![]() ![]() ![]() I think he means the first game of the serie, that in europe was called Gryzor [ Show youtube player ] |
|
![]() |
![]() |
#1143 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Quote:
![]() This instruction move.b fliplut(pc,d3.l),-(sp)actually do: subq.l #2,sp move.b fliplut(pc,d3.l),(sp) to keep the stack aligned to even addresses. On pure 68k is faster than the shift instructions. |
|
![]() |
![]() |
#1144 | |
Registered User
Join Date: May 2018
Location: Ireland
Posts: 691
|
Quote:
A proper Contra game on the Amiga would be amazing. |
|
![]() |
![]() |
#1145 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
Prior to doing Rygar I was going to make game dev tutorials and the likelihood is that is what I will do because of the lesser impact on my free time, I'll still feel I'll be giving to the Amiga community and helping people which I enjoy. I'm not 100% what the tutorials will cover yet but they'll probably be taking the game engines I have created with Bomb Jack and Rygar and teaching anyone who is interested around how they work so that they can be adapted enabling people to convert games themselves while also learning the Amiga internal...but most importantly passing on all the little game design tricks I picked up from converting these games. So in summary... I'll not be coding any other games in the short term as I don't have the time but I'll be sticking around. Geezer |
|
![]() |
![]() |
#1146 |
Registered User
Join Date: May 2018
Location: Ireland
Posts: 691
|
I understand completely mcgeezer, and likewise I hate coding in the summer.
What I mentioned was only a suggestion, absolutely not to take away from your current work on Rygar and I apologise if it came across as such. |
![]() |
![]() |
#1147 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
It's all good. |
|
![]() |
![]() |
#1148 |
Registered User
Join Date: May 2010
Location: London, UK
Posts: 268
|
@mcgeezer and @ross thanks for posting your sprite-flipping code, that'll be really useful for me!
|
![]() |
![]() |
#1149 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
Here is the code now in Rygar. Code:
; Input d1=longword ; Output d1=longword reversed REVERSE_LONGWORD: movem.l d0/d2/d3/a0,-(a7) lea BYTE_REVERSE_TAB(a4),a0 moveq #8,d3 ; Do first 3 bytes rept 3 moveq #0,d0 move.b d1,d0 move.b (a0,d0),d2 lsr.l d3,d1 lsl.l d3,d2 endr ; Final byte but without shift moveq #0,d0 move.b d1,d0 move.b (a0,d0),d2 move.l d2,d1 movem.l (a7)+,d0/d2/d3/a0 rts ; Ross's code to generate a byte swap table ; Conisderably more efficient and smaller than my effort. GENERATE_BYTE_SWAP_TABLE: movem.l d0-d3/a0,-(a7) moveq #0,d1 lea BYTE_REVERSE_TAB(a4),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 movem.l (a7)+,d0-d3/a0 rts |
|
![]() |
![]() |
#1150 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,039
|
Quote:
|
|
![]() |
![]() |
#1151 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
d0 needs to be 0 on the Reverse Longword sub, I know it only too well because I had an over flow when I called it and it took me a while to find the problem. I was finding that any sprite above 255 would not flip because d0 was set to >$100 and therefore the lookup wasn't working.
|
![]() |
![]() |
#1152 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,039
|
Quote:
|
|
![]() |
![]() |
#1153 |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,039
|
You can use this code, if you want, and if it works.
Code:
; Input d1=longword ; Output d1=longword reversed REVERSE_LONGWORD: movem.l d0/a0,-(a7) lea BYTE_REVERSE_TAB(a4),a0 moveq #0,d0 move.b d1,d0 move.b (a0,d0.w),d1 ror.w #8,d1 move.b d1,d0 move.b (a0,d0.w),d1 swap d1 move.b d1,d0 move.b (a0,d0.w),d1 ror.w #8,d1 move.b d1,d0 move.b (a0,d0.w),d1 movem.l (a7)+,d0/a0 rts |
![]() |
![]() |
#1154 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
Quote:
Why do you think it should be 0? |
|
![]() |
![]() |
#1155 |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Yes because if d0 is greater than $FF then the move.b (a0,d0),d1 will over run past the look up table.
I fixed it by simply setting d0=0, I didn't try it but I guess I could have fixed it by doing move.b (a0,d0.b),d1. Geezer |
![]() |
![]() |
#1156 | |
Registered User
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
|
Quote:
![]() The actual first run always produces 0 of the correct before it is pushed onto the LUT. I'll get my coat. ![]() |
|
![]() |
![]() |
#1157 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
|
![]() |
![]() |
#1158 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,021
|
![]() ![]() |
![]() |
![]() |
#1159 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,491
|
|
![]() |
![]() |
#1160 |
Banned
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
|
Yeah we know; *cough* Shadow Warriors fixed music 4th stage / trained version
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
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 |
|
|