12 October 2017, 17:14 | #301 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
I count six words moved per scanline for three sprites. No sprite bitmap DMA at all.
So in total you need 6 moves for the sprites, 2 for the road fill and two or three to change the palette. That's 11 per scanline. Compared to blitting which needs you to wait for the blitter to complete, re-load address registers, calculate shift values and load them, then write the control registers. And do the colour palette changes, the same as my scheme. And on multiple bitplanes if you want grass/road/road markings. In the best case you need 2 bitplanes, assuming you use dual-playfield to avoid having to share bitplanes with objects. And for the next frame you have to clear at least part of what you previously copied if you have hills. Oh, and while the blitter is running the CPU is losing memory access slots to DMA, and the blitter isn't available to draw objects. Last edited by zero; 13 October 2017 at 13:20. |
13 October 2017, 08:26 | #302 |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
Wouldn't it be rather difficult to read all 6 buttons and the control stick for combos? I'm guessing reading the forward, down, down forward + punch would be a struggle on a standard A500. Might be ok on a CD-32 though? a standard direction + 1 of the 6 buttons would be rather easy, but check maybe 3 buttons at once??
|
14 October 2017, 01:42 | #303 | |
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
Quote:
The CD32 controller used the same joystick port plug as all other Amigas (which in turn goes all the way back to the Atari 2600 VCS!), so it follows that 7 data pins are enough to read a D-pad plus 6 buttons. The Amiga Hardware Reference Manual states that the Amiga handles two buttons (equivalent to left and right mouse), but given that the CD32 controller worked just fine with CD32 games on my A1200 back in the day (and I even wrote a little AMOS test program to check the values from the pad/button/pin combinations), I'd say it could always technically use at least 6. |
|
14 October 2017, 03:32 | #304 | |||||
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
Quote:
Quote:
[I have some images which demonstrate how this works, but I need to ask the permission of the person who gave them to me] Quote:
Because the sky/grass/road/markings can be done in a single bitplane using copper palette changes, my feeling is that this makes using one playfield for the sky/horizon/road and the other for objects impractical, as the theoretical foreground (object) playfield needs to display the player's Ferrari, the traffic and the roadside objects and would thus require significantly more palette entries available than the background playfield. From an aesthetic standpoint, I don't think I can remap the Ferrari into less than 7 palette entries without compromising the look-and-feel more than I'd like to. Admittedly using 7 palette entries for a single object sounds somewhat wasteful on the face of it - but on the one hand that sub-palette contains black (universally useful elsewhere), light grey (certainly re-usable) and 3 red/pink shades which could also probably be pressed into service elsewhere on the screen. If worse came to worst, the vast majority of the time those colours aren't required until about Y-co-ordinate 175 (or thereabouts) and you could poke them in with the copper at that scanline - though this would make the high-speed crash animation (where the car is drawn vertically above that line) a bit of a headache. In general I'm thinking roughly along these lines - single-playfield 4-bitblane mode, with COLOR00 and 01 used for the sky/road/markings, 02 through 09 used for the Ferrari (including the black and light grey which can be used extensively for other objects), 10 through 12 for roadside objects and 13 through 15 for the traffic. I'm hoping to use sprites for the HUD and the couple in the player's car, which will use various combinations of COLOR16 through 31. Admittedly I haven't worked out the best way to deal with the horizon graphics yet, but frankly we've got many bridges to cross before that becomes a showstopper! Quote:
Quote:
Obviously if anyone can spot any gaping flaws in my approach, please tell me! |
|||||
16 October 2017, 10:57 | #305 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
|
16 October 2017, 11:10 | #306 | ||||
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
Quote:
The blitter is not free. Using it slows down the CPU. Even on the A1200 you only have a small instruction cache. The calculations are actually not too bad at all. Lookup tables make it pretty fast. It's the rendering that makes it slow. Quote:
Quote:
Quote:
|
||||
16 October 2017, 22:08 | #307 | |||
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
Quote:
Quote:
As far as using the copper to change palette entries horizontally for the road, presuming COLOR00 is being used for the "tarmac" and COLOR01 for the "markings", it's only COLOR01 you'd need to change, and because most of each strip is COLOR00, that can be done inbetween the markings without sacrificing resolution, if I'm not mistaken... Quote:
As far as the CD32 controller goes, thanks for the heads-up on the serial data feed. Note that I didn't say A500 games used the CD32 controller, I specifically said that some games I had on my A1200 used the CD32 controller (Gloom is one that springs to mind). I might be mis-remembering what I tested with my AMOS program on the A500 (we are talking about 24-25 years ago now...) and later on the A1200 - it could have been a 3-button Mega Drive joystick we had lying around. Last edited by TuRRIcaNEd; 16 October 2017 at 22:54. |
|||
17 October 2017, 12:59 | #308 | |||
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
Quote:
I think what that comment about Lotus means is that A4 is used to communicate with an interrupt triggered when the blitter finishes or something like that. Otherwise it makes no sense. Quote:
Here is every possible combination of bitplane 0, 1 and 2: 210 --- 000 001 010 011 100 101 110 111 As you can see, changing any bit narrows the choice of the other bits to half the available colours. This is true no matter how many bitplanes you have, each bitplane will always "select" half the palette. For example, if you render the road on bitplane 0. A 0 is grass, road is 1. Then everything drawn over the grass (0) will use even colours and every drawn over the road (1) will use odd colours. If you switch to bitplane 2 then everything drawn over grass will use colours 0-3, and everything drawn over the road will use colours 4-7. Quote:
|
|||
17 October 2017, 23:04 | #309 | ||
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
Quote:
With a bit of luck we'll have the basis for a simple tech demo sometime early next year - I certainly intend to stick it up on GitHub, so if you want to take it and try implementing your idea, you'd be more than welcome to! [PS. I do understand how bitplanes work, sir... As I said, the idea is to do it with multiple passes, drawing the road first (while noting object positions), then blitting the horizon/sky, finally drawing the objects in reverse. The objects blitted over the road will reset the planar values in that case I believe...] [PPS : Quote:
If I understand this correctly, the following two images show what is generated with the alternate-scanline copper switch turned off. Firstly with a white kerb (COLOR01 = white or light grey) : Then with a red kerb (COLOR01 = red, then dark grey for the tarmac, then red again for the opposite kerb): With the copper alternating those values at the required number of scanlines you get this : Note that the "kerb" is relatively thick horizontally compared to the road markings (at least 4px until some way into the distance). As I understand it this is probably to allow for the OCS/ECS copper's 4px "resolution" when it comes to mid-scanline palette changes. ] Last edited by TuRRIcaNEd; 18 October 2017 at 00:28. |
||
18 October 2017, 18:13 | #310 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
Your solution ultimately isn't that dissimilar to mine, the main difference being that you want to use bitmaps and I want to use sprites for the road markings and edges.
So if you just changed to using sprites instead of bitmaps you would save a massive amount of blitting, and get some extra colours for free potentially due to sprite palette mapping. |
19 October 2017, 20:57 | #311 |
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
The question is how you propose to use the sprites for that. I may be misunderstanding, but it seems like a hell of a lot of complexity any way I see it. Could you elaborate on how you'd use them?
|
19 October 2017, 22:52 | #312 |
Registered User
Join Date: Dec 2016
Location: Finland
Posts: 168
|
This problem is probably possible to solve with sprite multiplexing, under OCS/ECS you can cover whole screen with a single sprite, by writing manually each 16 bit spritedata into sprite POS and DAT registers. But there is only time for the copper to change one of the DAT registers, so only 1 color is possible, and in lores, only 4 bitplanes can be used, or else bitplane DMA starts using too many cycles, and copper is slowed down to much.
The copperlist would look as following, for one sprite (spr0datb is set to 0 somewhere else) dc.w waitY,$fffe ;first line of spritedata dc.w spr0pos, yposxpos dc.w spr0data,data00 dc.w spr0pos, yposxpos dc.w spr0data,data01 ... dc.w waitY,$fffe ;second line of spritedata dc.w spr0pos,yposxpos dc.w spr0data,data10 dc.w spr0pos,yposxpos dc.w spr0data,data11 ... end of copperlist Here, ypos and xpos must be filled in with CPU with correct values, and gaps can be left, so that the sprite doesn't need to cover every pixel on screen. Only one sprite can be multiplexed in this way at a time, and the rest of sprites should be still available for normal use. There should also be time for color changes with copper on start of each line, before sprite data starts. The idea with 3 sprites and attempting to cover all road markings with those won't work well, as they are just 16 pixels wide and the road is bending in x-direction. Reusing sprites in y-direction leaves a gap of 1 pixel between sprites, if done with spriteDMA, so you will possibly get holes in road markings. Last edited by coder76; 19 October 2017 at 23:16. Reason: looks like only 1 color sprite is possible with this method |
20 October 2017, 09:48 | #313 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
Look at the road bitmap. The edges and road markings are just lines of a given width. The width doesn't even change between most lines, only occasionally. So all you need to draw them are some 1 pixel high sprites that are the width of the line, and a copperlist to set the X coordinate every line.
You don't need bitmap DMA for them, when you want to change the width of the line you can just write that data directly into SPRxDAT with the copper. coder76 has the right idea. I'd use multiple sprites though, as none of the road markings or edges are ever more than 16 pixels wide anyway. |
20 October 2017, 11:03 | #314 |
Registered User
Join Date: Feb 2011
Location: Italy/Rome
Posts: 2,281
|
On Aga, we can use copper only for changing shift register and bitmap pointer for each roads' scan line! If we use a pre animated road, we can archive full texture road!
|
21 October 2017, 13:11 | #315 | |
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
Quote:
I'm intending to use sprites for the couple in the Ferrari and quite a chunk of the status HUD. Won't that be too many for the sprite hardware to handle (to say nothing of having to poke a lot of data in with the CPU)? In actual fact, the method you're describing sounds very similar to how Pole Position was implemented on the Atari 2600 VCS. IIRC it used a hardware trick which re-utilised the two "missile" graphics on each subsequent scanline for the kerbs, and the "ball" graphic for the road marking. Last edited by TuRRIcaNEd; 21 October 2017 at 13:55. |
|
21 October 2017, 18:15 | #316 | |
Registered User
Join Date: Dec 2016
Location: Finland
Posts: 168
|
Quote:
|
|
21 October 2017, 20:35 | #317 | |||
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
Quote:
Quote:
Quote:
|
|||
22 October 2017, 21:54 | #318 | |
Registered User
Join Date: Dec 2016
Location: Finland
Posts: 168
|
Quote:
Yes, I listened to the tunes, seems like good, but these tunes, they do take up maybe too much memory. If the target is 1 MB of memory, then some optimizations need to be probably done on samples, maybe reuse same instruments in the tunes, and load in samples separately. .mod files won't let you do that, as all samples and pattern data is saved into a single file. |
|
22 October 2017, 23:52 | #319 |
AKA Mr. Rhythm Master/AIS
Join Date: Aug 2017
Location: London, UK
Posts: 70
|
We're starting with 2MB ChipRAM (AGA setup). I figure it's best to aim for the best fidelity possible, then optimise/downconvert where necessary. I'm going to try to get them down to 150k or thereabouts - which is still pretty big for ingame music (traditionally they tended to be around 50-80k max), but because I'm not worried about squeezing the executable into 1MB or fit on floppies (yet) it shouldn't be too much of an issue.
|
27 October 2017, 10:50 | #320 |
Registered User
Join Date: Jun 2016
Location: UK
Posts: 428
|
Just move the HUD off the main play area.
|
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 |
|
|