05 May 2023, 22:20 | #2461 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
Quote:
The code would be a lot simpler if this was dispensed with and we just used 1 byte per pixel and allow walls to use the whole palette. To gain performance with large textures at a distance, we need mip mapping. However, due to the way the columnar rendering works, you'll only get a performance increase by using vertically halved MIP maps. Horizontal reduction doesn't help performance as much but it could definitely improve visual quality as you would reduce moiré and aliasing artefacts. However due to the palette based rendering you would likely want to precompute all mip maps to ensure they are good. One thing I really like the idea of is computing the shade table without mapping back to the palette and just having RGB values that can be rendered to an RTG display. There are 21 brightness levels, 256 basic colours, allowing for over 5000 colours. Direct render to RGB16 is probably within reach of 040/060. |
|
06 May 2023, 11:41 | #2462 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
@pipper
Regarding C, I was thinking about coming at the problem from the opposite direction. For example, writing a self contained C module for video. This could assume the responsibility for opening the screen, flipping buffers and transferring the fast buffer to the display. It could also collect idcmp events and all that stuff, in theory, but the main impetus is for a clean room reimplementation of the display logic so that RTG can be fitted easily. From the assembler side it would have very simple call hooks that work the same whether you are on an AGA/C2P screen or an 8-bit RTG one. Something similar could be done for audio, allowing AHI and proper audio mixing perhaps. |
06 May 2023, 12:01 | #2463 |
Registered User
Join Date: Sep 2005
Location: Peterborough
Age: 47
Posts: 849
|
Is there a new engine file and/or level designs to test? I’ve got some spare time for a change!
|
06 May 2023, 12:29 | #2464 |
Registered User
Join Date: Oct 2013
Location: Wrocław, Poland
Posts: 202
|
|
06 May 2023, 12:36 | #2465 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
|
08 May 2023, 01:46 | #2466 | |
Registered User
Join Date: Jun 2019
Location: Saltdean, United Kingdom
Posts: 146
|
Quote:
|
|
08 May 2023, 01:51 | #2467 | |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 1,988
|
Quote:
https://github.com/0xABADCAFE/karlos-tkg/tree/main and the thread for it here https://eab.abime.net/showthread.php?t=111637 Last edited by abu_the_monkey; 08 May 2023 at 03:41. |
|
10 May 2023, 02:35 | #2468 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
I've been having a look at the wall rendering code again, trying to make a bit more sense about a few things. I can't be sure just yet, but I think the lack of dithering on Gouraud shaded walls might be an unintentional defect and not as I initially assumed a performance trade off. If that's true, then fixing it could result in some overall improvement to the render quality, especially where complex lighting arrangements are in effect.
|
11 May 2023, 08:19 | #2469 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 667
|
I made some progress with the C migration stuff. PoC is here
https://github.com/mheyer32/alienbre...e/migrate_to_c (moving the screen allocation to C) |
11 May 2023, 09:01 | #2470 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
Quote:
There are a bunch of already refactored functions for system setu and IO that could be moved to C too. |
|
11 May 2023, 09:03 | #2471 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
It goes without saying that moving the display setup to C should simplify RTG support
|
11 May 2023, 09:15 | #2472 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 667
|
I didn’t observe any negative consequences. But I didn’t do a lot of testing either.
Making it so that assembly calls into C function is easy. The other way around we need to be more careful (in ab3d functions generally don’t care much about saving and restoring registers)But maybe some inline assembly to declare “all registers clobbered” will be enough to make the compiler save registers before calling into assembly. We’ll see. I’ll try to pull more stuff over in the next few days. |
11 May 2023, 10:37 | #2473 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
Yeah It's even worse than not saving and restoring registers, there are quasi-global registers that contain values that span across multiple calls. Once or twice I've observed that the traditionally volatile registers need to be preserved too.
|
11 May 2023, 10:45 | #2474 |
Registered User
Join Date: Apr 2023
Location: piteå/sverige
Posts: 12
|
Amazing work ! want to test it on my a4000 with 3660 @ 50mhz, witch files do i need and how do i install it ?
|
11 May 2023, 11:01 | #2475 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
Quote:
|
|
11 May 2023, 21:44 | #2476 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
I've not really done much engine work lately. I've been leveraging the last few bugfixes to tart up my mod a bit
|
11 May 2023, 22:16 | #2477 |
Registered User
Join Date: Apr 2023
Location: piteå/sverige
Posts: 12
|
no sorry i have the whdload only. always wonder why it never was ported to ppc but your work have made it playable on 68ks
|
11 May 2023, 22:23 | #2478 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,260
|
Quote:
However, porting the display and audio components to C, on their own, would pretty much allow for an RTG/AHI version that would run on PPC under emulation. Last edited by Karlos; 11 May 2023 at 23:30. |
|
12 May 2023, 09:23 | #2479 |
Registered User
Join Date: Dec 2022
Location: Internet
Posts: 26
|
How much, if any negative impact on performance can we expect porting the code to C would have? I would guess todays compilers generate more optimized binaries compared with what was available when this game originally was developed.
From my understanding by just following the discussions here the original assembly code have room for optimization. If we just play with the thought and compare that with a highly optimized C version, compiled with the tools available back then, how much did they gain by using assembly? |
12 May 2023, 09:58 | #2480 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 667
|
The goal is should be to not compromise on speed. Karlos invested lot of time in shaving off cycles - these efforts will not be wasted. At first I’d like to mostly to replace higher level functions like screen setup, system setup etc which are often on-offs. I imagine moving up the outer most game loop to C would also work. The innermost renderloops will very likely stay assembly.
Having the C environment available allows for easier prototyping and testing. I don’t know if anyone has really appetite to move everything to C. But if you did, the game could then also be ported to other platforms… but let’s focus on RTG first. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Alien Breed 3D II The Killing Grounds RTG patch | Angus | Retrogaming General Discussion | 63 | 14 December 2022 15:20 |
Alien Breed & Alien Breed '92: SE - delay when picking up items / opening doors | Ian | support.WinUAE | 16 | 23 December 2016 15:50 |
Alien Breed 3D II : The Killing Grounds code booklet | alexh | support.Games | 19 | 10 October 2012 22:17 |
Alien Breed 3D 2 - The Killing Grounds | Ironclaw | support.Games | 12 | 13 September 2005 13:07 |
HD Version of Alien Breed I ? | Kintaro | request.Old Rare Games | 20 | 31 July 2003 10:48 |
|
|