English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 22 August 2020, 20:28   #1
Rotareneg
Registered User
 
Rotareneg's Avatar
 
Join Date: Sep 2017
Location: Kansas, USA
Posts: 327
F-18 interceptor alternating between 5 and 4 bitplanes

I was just playing around with the visual DMA debugger and I noticed something I can't figure out: F-18 interceptor alternates between using 4 and 5 bitplanes every other rendered frame (not video frame.) Anyone know why they would do that?

4 bit planes:



5 bit planes:

Rotareneg is online now  
Old 22 August 2020, 21:46   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,201
maybe one plane is for HUD, and isn't updated every frame to save CPU time? easy to check by turning planes off and check if HUD goes away.
jotd is offline  
Old 22 August 2020, 23:33   #3
Rotareneg
Registered User
 
Rotareneg's Avatar
 
Join Date: Sep 2017
Location: Kansas, USA
Posts: 327
The only evidence I can see for the 5th bit plane being used at all is on the title screen. Everywhere else I just get a blank screen if I isolate only 5 and no visible difference if only 1-4 are enabled. It even alternates between 4 and 5 planes with each letter as it "prints" the credit text.
Rotareneg is online now  
Old 23 August 2020, 00:28   #4
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,411
That is very odd indeed. It would waste a whole bunch of cycles to achieve nothing... Makes me wonder what the idea was here. Mysterious!
roondar is offline  
Old 23 August 2020, 00:32   #5
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
Quote:
Originally Posted by Rotareneg View Post
The only evidence I can see for the 5th bit plane being used at all is on the title screen. Everywhere else I just get a blank screen if I isolate only 5 and no visible difference if only 1-4 are enabled. It even alternates between 4 and 5 planes with each letter as it "prints" the credit text.
It's been a long time since I last loaded F18, and I haven't done it now, so I can be totally wrong.
I can only guess why it does it (or at least I would do it for this reason )

Let's say you have to do some blinking/shadow effects using colors that are not in the initial 16 color palette.
Since they have to flash I can activate a fifth bpl alternately every other frame, but also only when I need them.
But there is a problem: in those situations I would have a slowdown in the rendering of the graphics engine.
So to keep the FPS consistent I can constantly alternate the frames to keep the speed constant in any case.
ross is offline  
Old 23 August 2020, 11:57   #6
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
But the frame rate is so low, that the blinking would be like 4 or 5 times a second maximum... that would look awful.

I am wondering if he has a double buffered copperlist, and for some reason possibly even forgot to change one of the copperlists from setting 5 bitplanes active down to 4
DanScott is offline  
Old 23 August 2020, 12:03   #7
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
Quote:
Originally Posted by DanScott View Post
But the frame rate is so low, that the blinking would be like 4 or 5 times a second maximum... that would look awful.
Why?
The blink could be totally unrelated with the rendering... (if double buffered)

Quote:
I am wondering if he has a double buffered copperlist, and for some reason possibly even forgot to change one of the copperlists from setting 5 bitplanes active down to 4
This could be too, but I wanted to hope it wasn't
ross is offline  
Old 23 August 2020, 12:31   #8
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,201
it means that if we remove the 5th plane the game will be faster? I doubt it, but if it's the case, it would be a quickwin
jotd is offline  
Old 23 August 2020, 12:45   #9
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
Quote:
Originally Posted by ross View Post
Why?
The blink could be totally unrelated with the rendering... (if double buffered)
Original poster wrote:

"alternates between using 4 and 5 bitplanes every other rendered frame (not video frame.)"

So i assume he means that the 4/5 bitplane switch does not happen at 50hz
DanScott is offline  
Old 23 August 2020, 12:46   #10
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
Quote:
Originally Posted by jotd View Post
it means that if we remove the 5th plane the game will be faster? I doubt it, but if it's the case, it would be a quickwin
If it is really unused then it can be removed .
Which goes faster depends on how the frame change / rendering code is structured.
ross is offline  
Old 23 August 2020, 12:48   #11
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,475
Quote:
Originally Posted by DanScott View Post
Original poster wrote:

"alternates between using 4 and 5 bitplanes every other rendered frame (not video frame.)"

So i assume he means that the 4/5 bitplane switch does not happen at 50hz
ahh, you are right!

Then this makes even less sense..
ross is offline  
Old 23 August 2020, 15:27   #12
Rotareneg
Registered User
 
Rotareneg's Avatar
 
Join Date: Sep 2017
Location: Kansas, USA
Posts: 327
The first screenshots were with some fast RAM to reduce CPU "noise" in the DMA debugger, here it is with only chip RAM:





Both shots are the same number of video frames from the last display update. In that particular scene it took 7 PAL frames to render when 4 bp were active and 8 PAL frames with 5 bp, so there is some performance hit.

On another note, it does unfortunately tie the simulation speed to the frame rate, so if you go all out with JIT fastest possible and immediate blitter it'll run super smooth but also far too quickly.
Rotareneg is online now  
Old 23 August 2020, 18:11   #13
Old_Bob
BiO-sanitation Battalion
 
Old_Bob's Avatar
 
Join Date: Jun 2017
Location: Scotland
Posts: 151
I remember fiddling about with this a while ago. IIRC, it only behaves this way when running the intro demo sequence. In gameplay, I think it's fine.

Quote:
Originally Posted by DanScott View Post
I am wondering if he has a double buffered copperlist, and for some reason possibly even forgot to change one of the copperlists from setting 5 bitplanes active down to 4
It does switch between two lists so, this seems like the most likely explanation.

B
Old_Bob is offline  
Old 23 August 2020, 21:58   #14
Rotareneg
Registered User
 
Rotareneg's Avatar
 
Join Date: Sep 2017
Location: Kansas, USA
Posts: 327
It does it while playing too, the screenshots in the post above are from the free flight mode. Programmer oversight aka bug sounds good to me.
Rotareneg is online now  
Old 23 August 2020, 22:45   #15
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
The palette to this game seemed dark to me, do you think they use a 512 palette instead of a 4096 palette?
redblade 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
F/A-18 Interceptor jotd Nostalgia & memories 51 21 January 2020 09:36
bitplanes format jarre Coders. General 3 19 January 2019 17:38
A1000 alternating black & gray screen blinking LED G.A.Pster support.Hardware 7 10 October 2016 08:23
F/A-18 Interceptor whiteb project.SPS (was CAPS) 12 12 May 2013 19:44
F/A-18 Interceptor VermillioN support.Games 4 15 October 2002 06:58

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 09:01.

Top

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