English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 19 July 2017, 13:10   #241
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,342
Quote:
Originally Posted by Miggy4eva View Post
EDIT - OK, now I see online some details. STE had simm slots on the motherboard for 30 pin simms. So what? My point is still that STE with fully populated RAM slots is modified. It is considered modified, therefore you must allow Amiga modified with RAM board, or the tracer cut on the motherboard to allow 2MB of chipram to be allowed. Most Amiga ram board required very little soldering anyway, and then once board was installed you could use SIMM's to change memory as much as you want with zero effort.
The cost of a RAM board for the Amiga must be added to the cost of memory itself, which is why there are so few fast RAM expansions for the A500 around. The STE doesn't have that problem since as soon as SIMMs come down in price, they can be installed using nothing more than a screwdriver.

You can't just cut traces and get 2 MB of chip RAM. Only a minority of Amigas have the required 8375 Agnus.

And if inserting SIMMs into the motherboard is modified, then so is a trapdoor expansion for 1 MB of RAM. So the Amiga should enter the competition with 512 kB of chip RAM.

4MB STE isn't a "stock" STE, so to have equal, fair chance in a retro style battle of ports then A500 must be allowed to compete with RAM upgrade also. That is my point.

Quote:
Originally Posted by Miggy4eva
ST users were budget people and not much of them could afford 4MB in the 80's anyway. Yes, early 90's when the 30 pin simms started to get cheap maybe every die-hard STE owner who hadn't upgraded to Amiga or PC by then might have 4MB but it's not common configuration in "golden era" so you can't compare 4MB STE to 1MB A500 in these battles. Should be 4MB STE vs 4MB A500 with 2MB Chipram motherboard mod to be equal, oranges vs oranges comparison. And in that situation the Amiga will defeat the ST yet again.
If you're doing that kind of upgrading, just do the full Monty and install a Vampire.
idrougge is offline  
Old 19 July 2017, 13:11   #242
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,342
Quote:
Originally Posted by AnimaInCorpore View Post
I think this is a very good point. FastRAM seems the way to go. What are the options here for the Amiga 500 (except for turbo cards)?
Most hard drives had fast RAM.
idrougge is offline  
Old 19 July 2017, 13:13   #243
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,342
Quote:
Originally Posted by zero View Post
I remember reading the startup-sequence rant of Final Fight that the coder claimed to be doing flipping in real-time. I always wondered about that... Maybe he meant just vertical flipping which is easy and cheap, because I can't really see any good way to do horizontal flipping while blitting without it being really slow.
Vertical flipping in a side-scrolling beat'em up seems quite pointless.

However, it is acceptable if a beat'em up character takes more than one vbl to turn around, so you could say that it is real-time.
idrougge is offline  
Old 19 July 2017, 13:38   #244
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by zero View Post
I remember reading the startup-sequence rant of Final Fight that the coder claimed to be doing flipping in real-time. I always wondered about that... Maybe he meant just vertical flipping which is easy and cheap, because I can't really see any good way to do horizontal flipping while blitting without it being really slow.
No idea how Final Fight does it, but the usual method would be using the cpu and a flip table.. either byte-based (256 bytes) or word-based (64kb). Some also stored the lower half of the bob flipped, so that for every direction half of the bob has to be flipped, to ensure constant runtime.


So first flip using the cpu, then blit+cookie-cut with the blitter. It's not exactly fast, but much more efficient than using the blitter alone, especially if you can afford the 64k for a word table.
chb is offline  
Old 19 July 2017, 13:43   #245
frank_b
Registered User
 
Join Date: Jun 2008
Location: Boston USA
Posts: 466
Quote:
Originally Posted by chb View Post
No idea how Final Fight does it, but the usual method would be using the cpu and a flip table.. either byte-based (256 bytes) or word-based (64kb). Some also stored the lower half of the bob flipped, so that for every direction half of the bob has to be flipped, to ensure constant runtime.


So first flip using the cpu, then blit+cookie-cut with the blitter. It's not exactly fast, but much more efficient than using the blitter alone, especially if you can afford the 64k for a word table.
It would have been useful to have a smudge mode equivalent indirect addressing mode on the amiga blitter. The st one can do horizontal bitmap hflippibg in four passes. It has 32 bytes of lookup table built in. You just need to combine it with the masks.

Last edited by frank_b; 19 July 2017 at 15:11.
frank_b is offline  
Old 19 July 2017, 13:45   #246
frank_b
Registered User
 
Join Date: Jun 2008
Location: Boston USA
Posts: 466
Only the 500 plus and the 600 can have two meg chip memory with ecs.
It requires an upgrade board in the trapdoor slot. Well the 3k does but it's not 500 class

Last edited by frank_b; 19 July 2017 at 14:49.
frank_b is offline  
Old 19 July 2017, 14:11   #247
dlfrsilver
CaptainM68K-SPS France
 
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 46
Posts: 10,484
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by zero View Post
I remember reading the startup-sequence rant of Final Fight that the coder claimed to be doing flipping in real-time. I always wondered about that... Maybe he meant just vertical flipping which is easy and cheap, because I can't really see any good way to do horizontal flipping while blitting without it being really slow.
Basically, the sprite list also include the flipped sprites frames.

so the 561 bytes i talked about, contains the left and right side, depending on the animation of the skeleton that has to take place.
dlfrsilver is offline  
Old 19 July 2017, 14:19   #248
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by frank_b View Post
It would have been useful to have a smudge mode equivalent indirect addressing mode on the amiga blitter. The st one can do horizontal bitmap hflippibg in four passes. It has 32 bites of lookup table built in. You just need to combine it with the masks.
If I'm not mistaken, the Amiga blitter should be able to do a hflip also in 4 passes - you'd using two source with different shift settings (one left-shift*, one right-shift) and a static mask in source C. Then first flip the bits pairwise (shift +/-1, mask 010101..), then in pairs of 2 bits (+/-2, mask 00110011..), 4 bits, finally 8 bits. I do not know if it was used, and I've never implemented it myself.

Smudge mode seems to be cool, though.

*by changing the start adress by one word + right-shift

EDIT: And you'd need to change the word order at one of the passes, but that should be free - just use a negative destination modulo (-2) which will give a hflip + vflip (reverse complete word order for the bob), and correct the vflip by using a negative modulo when you blit to the bitmap. Oh, and for bobs that blitting to the screen with for cookie-cutting and shifting would be the fith step, but I guess that's not included in your calculation for the STe, too?

Last edited by chb; 19 July 2017 at 14:41.
chb is offline  
Old 19 July 2017, 14:50   #249
frank_b
Registered User
 
Join Date: Jun 2008
Location: Boston USA
Posts: 466
Quote:
Originally Posted by chb View Post
If I'm not mistaken, the Amiga blitter should be able to do a hflip also in 4 passes - you'd using two source with different shift settings (one left-shift*, one right-shift) and a static mask in source C. Then first flip the bits pairwise (shift +/-1, mask 010101..), then in pairs of 2 bits (+/-2, mask 00110011..), 4 bits, finally 8 bits. I do not know if it was used, and I've never implemented it myself.

Smudge mode seems to be cool, though.

*by changing the start adress by one word + right-shift

EDIT: And you'd need to change the word order at one of the passes, but that should be free - just use a negative destination modulo (-2) which will give a hflip + vflip (reverse complete word order for the bob), and correct the vflip by using a negative modulo when you blit to the bitmap. Oh, and for bobs that blitting to the screen with for cookie-cutting and shifting would be the fith step, but I guess that's not included in your calculation for the STe, too?
Neat.
The advantage of the look up table is that you're not limited to one transformation. You can hflip and scale by 2x, 4x, 8x, 16x at the same time too

Masking would indeed be a separate step. You need to use the shift to select which 4 bits of the source to look up and swap.
The masks control which bits on the destination are mutable. You can use the smudge mode all sorts of cool ways. It can be used for colour expansion of a mono bitmap to a high colour screen for example. Useful for text blitting on palette less screens.
frank_b is offline  
Old 19 July 2017, 16:09   #250
chb
Registered User
 
Join Date: Dec 2014
Location: germany
Posts: 439
Quote:
Originally Posted by frank_b View Post
Neat.
The advantage of the look up table is that you're not limited to one transformation. You can hflip and scale by 2x, 4x, 8x, 16x at the same time too
Seems interesting! But how do you handle the different source- and destination sizes? Do you need additional passes or do your passes get bigger in size (e.g. 2x,4x...)? Horizontal flip + 2x scaling on the Amiga would be 8 passes, but everyone of them with the size of the original data. So no penalty for doing a hflip when scaling 2x (at least that's what I came up with, but it's literally back-of-the-envelope )

Quote:
Originally Posted by frank_b View Post
Masking would indeed be a separate step. You need to use the shift to select which 4 bits of the source to look up and swap.
The masks control which bits on the destination are mutable. You can use the smudge mode all sorts of cool ways. It can be used for colour expansion of a mono bitmap to a high colour screen for example. Useful for text blitting on palette less screens.
Nice stuff!
chb is offline  
Old 19 July 2017, 16:45   #251
zero
Registered User
 
Join Date: Jun 2016
Location: UK
Posts: 428
I guess he was probably talking about vertical only flipping (some of the characters spin round and Haggar's piledriver move turns them upside down). Sometimes there are copies of the same character facing both ways on screen, so unless he flips as he blits them onto the screen there wouldn't be much to gain...
zero is offline  
Old 19 July 2017, 18:16   #252
frank_b
Registered User
 
Join Date: Jun 2008
Location: Boston USA
Posts: 466
Quote:
Originally Posted by zero View Post
I guess he was probably talking about vertical only flipping (some of the characters spin round and Haggar's piledriver move turns them upside down). Sometimes there are copies of the same character facing both ways on screen, so unless he flips as he blits them onto the screen there wouldn't be much to gain...
I was talking about hflipping a raster with the blitter, I uploaded an implementation I wrote in c via the atari blitter from about 2007 or so. The thread can be found on atari-forum.com if you're interested

When scaling the dest is going to be larger than the source.
Here's the implementation and compiled atari binary. https://www.dropbox.com/s/gpdc18dm0v...CALER.zip?dl=0

The CPU routine was used initially to test the lookups and algorithm. It's interesting to compare the speed between the two.
Hardware wins It's an elegant little chip. It's more useful in an art package than a game. Brush flipping and magnification is the main use case.

Last edited by frank_b; 19 July 2017 at 18:35.
frank_b is offline  
Old 20 July 2017, 12:02   #253
zero
Registered User
 
Join Date: Jun 2016
Location: UK
Posts: 428
I did a few experiments today, admittedly on my A4000/060, but it certainly seems like even a very small amount of fast RAM would really provide a massive boost for an unexpanded Amiga. With caches off the difference between running code from chip RAM and fast RAM is dramatic, especially when you have lots of DMA enabled.

My little test code could easily plot 2x as many dots to screen with code in fast RAM, without any optimization.
zero is offline  
Old 20 July 2017, 12:10   #254
kovacm
Banned
 
Join Date: Jan 2012
Location: Serbia
Posts: 275
offtopic: I can not remember exactly but Amiga with e.g. 030 CPU for some reason can not use CPU cache? or I am completely wrong??
kovacm is offline  
Old 20 July 2017, 13:15   #255
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,342
The CPU cache is used by default.
idrougge is offline  
Old 20 July 2017, 13:39   #256
frank_b
Registered User
 
Join Date: Jun 2008
Location: Boston USA
Posts: 466
Quote:
Originally Posted by idrougge View Post
The CPU cache is used by default.
Chip memory isn't cached with the datacache. The instruction cache works from chip though.
frank_b is offline  
Old 20 July 2017, 14:03   #257
kovacm
Banned
 
Join Date: Jan 2012
Location: Serbia
Posts: 275
Quote:
Originally Posted by frank_b View Post
Chip memory isn't cached with the datacache. The instruction cache works from chip though.
I see. Amiga design prevent use of data cache with chip ram.
kovacm is offline  
Old 20 July 2017, 14:19   #258
frank_b
Registered User
 
Join Date: Jun 2008
Location: Boston USA
Posts: 466
Quote:
Originally Posted by kovacm View Post
I see. Amiga design prevent use of data cache with chip ram.
User space programs can grab the blitter and use it directly. There's no single interface to it which can flush the cache. Safer to inhibit it. The individual computers accelerators allow you to switch it on though via a tuning parameter.
frank_b is offline  
Old 20 July 2017, 14:23   #259
kovacm
Banned
 
Join Date: Jan 2012
Location: Serbia
Posts: 275
Data in CPU data-cache and actual data in chip-memory could be different since Amiga custom chips can modify chip ram data without CPU.
This is the reason why it is safe (or needed) to disable CPU data cache on Amiga? And there is no way for chip ram to tell CPU to flush data cache? Did I understand correctly?
kovacm is offline  
Old 20 July 2017, 15:12   #260
frank_b
Registered User
 
Join Date: Jun 2008
Location: Boston USA
Posts: 466
Quote:
Originally Posted by kovacm View Post
Data in CPU data-cache and actual data in chip-memory could be different since Amiga custom chips can modify chip ram data without CPU.
This is the reason why it is safe (or needed) to disable CPU data cache on Amiga? And there is no way for chip ram to tell CPU to flush data cache? Did I understand correctly?
You can easily flush the caches via a supervisor mode instruction. There's no single interface to the blitter though. Where do you flush the data cache if every app can just grab the blitter and use it?
frank_b 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
Japanese Console/Computer RPG discussions Retro-Nerd Retrogaming General Discussion 2 02 April 2009 01:32
Given the recent Scanlines discussions... DamienD request.UAE Wishlist 26 26 April 2007 17:36
Wii Virtual Console / Xbox Live Arcade? killergorilla HOL suggestions and feedback 2 06 March 2007 17:20
Landover's Amiga Arcade Conversion Contest Frog News 1 28 January 2005 23:41

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 13:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.13995 seconds with 12 queries