![]() |
![]() |
#101 | |
Registered User
Join Date: Nov 2019
Location: Odense / Denmark
Posts: 251
|
Quote:
|
|
![]() |
![]() |
#102 |
Registered User
Join Date: Nov 2010
Location: South Wales
Age: 47
Posts: 947
|
|
![]() |
![]() |
#103 | |
Registered User
Join Date: Oct 2023
Location: London, UK
Posts: 124
|
Quote:
The sprites are the area I focused on most closely with this. That being said, I'm wary of over optimizing the original code at this point - any bugs I accidentally introduce will just make development slower and debugging difficult. And in my case, the original 68k logic is still pretty quick compared with the software sprite emulation/code. I had a quick pass tonight of replacing some of the 68000 instructions with 020/030 equivalents, especially using scale to access memory. This in itself wasn't so important, but using it allowed me in a couple of cases to free up a register or so in some very intense routines. If you're doing add.w d0,d0 type stuff for indexing you end up trashing the original register value, so sometimes a backup was previously needed, whereas one isn't now. I gained an 8% overall speed increase with this work with sprite rendering and a 20% increase on road rendering - although some of the road boost was down to fine tuning my (bad) code. I probably need to stop trying to optimize things now and port some more features over next. I also raised a VSCode/Amiga Assembly query here if anyone knows the answer: https://github.com/prb28/vscode-amig...iscussions/301 |
|
![]() |
![]() |
#104 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,775
|
Optimise a man's code and he'll see a performance gain for a single application.
Teach a man to optimise and he'll never finish anything ever again ![]() |
![]() |
![]() |
#105 |
cheeky scoundrel
Join Date: Nov 2004
Location: Spijkenisse/Netherlands
Age: 43
Posts: 7,029
|
|
![]() |
![]() |
#106 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,775
|
|
![]() |
![]() |
#107 | |
Registered User
Join Date: Nov 2019
Location: Odense / Denmark
Posts: 251
|
Quote:
Scalar index by 2 or 4, also done. My next thing planned is address register indexed for main cpu code (similar to how the road cpu uses a5, I have freed up a3 to do this). Saves a few cycles off every memory access. But huge task. I’m also experiencing the same problem in Vscode with single file build. Last edited by agermose; 22 February 2024 at 15:27. |
|
![]() |
![]() |
#108 | |
Registered User
Join Date: Nov 2019
Location: Odense / Denmark
Posts: 251
|
Quote:
On 68k the cost increases with shift count. |
|
![]() |
![]() |
#109 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,652
|
@agermose @reassembler prb28 has provided a solution to the syntax verification step problem in the github issue already, in case you didn't notice.
|
![]() |
![]() |
#110 |
Registered User
Join Date: Oct 2023
Location: London, UK
Posts: 124
|
|
![]() |
![]() |
#111 |
Registered User
Join Date: Oct 2023
Location: London, UK
Posts: 124
|
|
![]() |
![]() |
#112 |
Registered User
Join Date: Nov 2019
Location: Odense / Denmark
Posts: 251
|
|
![]() |
![]() |
#113 | |
Registered User
Join Date: Feb 2015
Location: Sweden
Age: 50
Posts: 2,998
|
Quote:
![]() |
|
![]() |
![]() |
#114 |
Registered User
Join Date: Oct 2023
Location: London, UK
Posts: 124
|
I've been working on two somewhat dull, but remaining parts of the rendering engine.
1/ The tilemaps. 2/ The palette fades between level transitions. For the end result - which isn't really as exciting as the road or sprites - these have taken a surprisingly long time to implement and been painful to code. OutRun's hardware has two separate tile layers, the foreground and background tile layers that scroll independently. Each layer comprises 4 name tables that can be arranged in a number of different ways. OutRun's arrangement is effectively has a 2,048 pixel wide faster scrolling foreground layer and a 1,536 pixel wide background layer (used for the giant clouds on Stage 1 for example). The tilemaps are relatively simple to cache into a giant off-screen image before blitting the visible area to the screen, which partially doubles as a screen clearing device which is nice. The difficulty arises when the level transitions and new tilemaps sweep into view dynamically and smoothly. At this point, the palette usage doubles, the number of tilemaps doubles and there's also a need to decode the tilemaps and render them without slowing down the overall experience. Because of the various optimizations I made to ensure tilemaps were as fast as possible during normal gameplay, this 5 second transition became incredibly tricky. Anyway - it appears to be working and behaving identically to the arcade. But, my god, for some reason it was just an awful coding experience. So much line by line debugging was needed for this transition. The palette transitions between stages weren't too bad. This section of code fades the road palette, the sky and background when transitioning between stages. I pretty much reworked these to AGA as the originals were using the Sega 5-bit per pixel colour format. Aside from that, I've been optimizing other areas of the code base. The road rendering code is substantially faster still, at the expense of some memory. This weekend, I'll try things out on hardware, take a video if I get a chance, and hopefully clean-up the latest code and kick the tyres for bugs. The main thing - and I'm going to regret saying this no doubt - is that a lot of the remaining game logic should be relatively easy. It's almost a copy and paste job from the original source code. I've found solutions for all of the rendering required and just about have enough colours remaining. It also isn't particularly performance intensive. Clouds and Foreground Tiles: Level Transition Stuff: |
![]() |
![]() |
#115 |
CaptainM68K-SPS France
|
Looks awesome ! Keep up the good work !!
![]() |
![]() |
![]() |
#116 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,409
|
if you have the commented original 68000 code, the logic will work just as well.
The hard part is always adapting the HW specs to the amiga, and inserting hacks known only by you so the rendering is good. Even in my Moon Patrol game (very modest but Z80 and required full RE), most of the time is spent on displaying colors properly. In the end you'll be proud to see how good your hack works during those 5 seconds ![]() No compromises, hack it to death! One of my personal favorites, keep up the good work. |
![]() |
![]() |
#117 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,099
|
Looks really good !!!
Hope that implementing the remaining logic will be as easy as you think ![]() |
![]() |
![]() |
#118 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,801
|
Quote:
May I ask what kind of setup you use here? Obviously a 1200/AGA, but how much RAM and which CPU? add/edit: Kudos, really nice project! Last edited by Tigerskunk; 14 March 2024 at 09:40. |
|
![]() |
![]() |
#119 |
Registered User
Join Date: Oct 2023
Location: London, UK
Posts: 124
|
I'm using a TerribleFire 1230 card. I expect the end result to need 8mb fast + 2mb chip if I wave my finger in the air.
I do intend to release a demo as I'd like reports from those with faster machines to provide performance stats. I would expect a considerable boost on 040 and 060 hardware. Before I do so, I have some work to do on my ROM conversion tooling that translates the graphics ROM data to the format required by the Amiga. |
![]() |
![]() |
#120 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,801
|
Quote:
Will pull my Vampired 1200 out of the closet for this to test.. ![]() |
|
![]() |
Currently Active Users Viewing This Thread: 5 (0 members and 5 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outrun AGA | agermose | project.Amiga Game Factory | 417 | 17 July 2024 19:08 |
Better Outrun port for Amiga | tekopaa | Retrogaming General Discussion | 399 | 14 April 2022 17:56 |
Outrun adfs | macce2 | request.Old Rare Games | 3 | 18 April 2021 21:22 |
would you like to have an Outrun like for Aga? | sandruzzo | Retrogaming General Discussion | 50 | 30 January 2013 12:03 |
Aweb: New APL 3.5Beta AOS4 PPC code + Milestone: KHTML porting started | Paul | News | 0 | 05 November 2004 11:21 |
|
|