English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 07 May 2024, 20:41   #4481
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
Quote:
Originally Posted by grond View Post
It does have them all but the way I remember it all bitfield-instructions are slow, even on the 060.
Yeah, but there's slow and slow. For rendering proportionally spaced glyphs, you pay more clock cycles but need fewer instructions and have less state to manage. You'll only be doing this when the text changes.
Karlos is online now  
Old 07 May 2024, 21:13   #4482
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,146
Quote:
Originally Posted by Karlos View Post
Yeah, but there's slow and slow. For rendering proportionally spaced glyphs, you pay more clock cycles but need fewer instructions and have less state to manage. You'll only be doing this when the text changes.
Don't have UM at hand but IIRC it's probably not going to be big deal compared to chip speed (on 060). Like hand crafted equivalent of e.g. bfset will be faster, but it will only really matter if you already had destination in fast mem (or register). If (source and/or destination) is in chip mem it will matter a lot.


Cycle counting is great, but what matters is memory speed (and cache effects). Inner loop optimizations only mattered (a bit) due to being very frequently called.
paraj is offline  
Old 07 May 2024, 21:38   #4483
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
Hmm. Well, the plan is to use the bitfield instructions to plot to the fast ram intermediate. I'm going for simplicity first. The glyph data is already planar, so the reasoning goes that inserting spans of glyphs into the destination at some arbitrary bit position is simpler. This is, in fact, how the original game renders the mission text proportionally. However, in that case it was rendering straight into chip ram.

The alternative seems to be to have a lot of shifting and masking.
Karlos is online now  
Old 07 May 2024, 21:53   #4484
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 1,977
Quote:
Originally Posted by Karlos View Post
I've pushed the changes so far to the misc/messages-redux branch of my fork. The 2/3 mode is now using up to 5 lines (4, with one for overflow) in the space between the 3D view and the bottom hud, as per the screenshot. The text is only redrawn once per message tick (about every second) and stops being drawn at all once the last redraw was blank, until something adds a new message line. Hopefully that keeps the overhead to a minumum.

The dev build can use the H key to disable the devmode HUD overlay which is pretty clashy.

This needs testing on real hardware ideally because I'm doing something I am not entirely sure is safe to do - namely invoking RectFill() on a bitmap that I currently have locked. The fill is assumed to be quicker than clearing the region using the CPU and the existing text plotting routines only render set pixels (so that they draw nicely over the background in fullscreen).

I do the RectFill before doing any CPU writes and expect this to be a synchronous operation. It certainly "works" in UAE, but the idea that the call happens while the bitmap is locked does worry me a bit.
seems to be ok on the A4000/040 CV643d.

didn't test much, no time
Attached Thumbnails
Click image for larger version

Name:	tkgc_resized.jpg
Views:	79
Size:	100.3 KB
ID:	82158  
abu_the_monkey is offline  
Old 07 May 2024, 22:17   #4485
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
Quote:
Originally Posted by abu_the_monkey View Post
seems to be ok on the A4000/040 CV643d.

didn't test much, no time
That is quite promising though. Something definitely feels hackish about the approach. I'm too scared to risk turning on the 1200T to test it

Last edited by Karlos; 07 May 2024 at 22:44.
Karlos is online now  
Old 09 May 2024, 20:33   #4486
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
In a facepalm moment, I just burned half an hour trying to figure out why a very low hanging fruit task - extracting the runtime-calculated character spacing information into a binary include - was resulting in a 8000 0005.

I thought it was all sorts of possible nonsense. In the end, it was simple. The code that builds the table was also keeping track of some maximum value that we later need to divide by (this is code I wrote, so I should've remembered) when initialising the messaging system. As the binary extracted version no longer calls the generator (or even has it), that value stays zero.

What a muppet.
Karlos is online now  
Old 09 May 2024, 21:34   #4487
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
I genuinely thought my char spacing data had an off by one error in the left margin that was being compensated for by a second one in the width, because to my surprise. the left margin nybble was mostly zero.

So I wrote a quick plotting utility and the result was a surprise... https://github.com/0xABADCAFE/alienb...scrollfont.txt

The character glyphs do seem to mostly have no left margin at all.
Karlos is online now  
Old 13 May 2024, 12:19   #4488
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
I have a slightly buggy working implementation of the planar mode proportional text plot for 2/3 mode and it doesn't use any bitfield ops. I opted for simple C code that can be trivially reimplemented and improved in assembly.

There are bugs which are a bit odd due to the fact a pure C standalone prototype worked flawlessly, but I did make a few minor changes on adding here so that's probably the cause, lol. There's also some border corruption due to the fact I'm blindly overwriting a screen wide region of bitplane 4 just below the 3D area. This was chosen as it gives an easily legible shade of grey that's not too bright. There's no colouring because I wanted to minimise the overhead and a single plane is the best way to do that.

Other than this it has all the same features as the RTG version, namely is redrawn on update only rather than per frame. Overhead should be next to nothing.
Karlos is online now  
Old 13 May 2024, 13:04   #4489
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
Yep, the glyph rendering bug was something incredibly trivial and obvious on revisiting it.

Here's how it looks in AGA Lores
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2024-05-13 12-02-47.png
Views:	52
Size:	58.0 KB
ID:	82204  
Karlos is online now  
Old 13 May 2024, 19:59   #4490
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
I made a bit more progress and pushed all the changes to the branch. I haven't fixed the cosmetic issues with the border yet but the single plane text rendering is stable and (I hope) fast in 2/3 screen AGA. Fixing the corruption just needs the first and last 16 bits of each scanline of bitplane 4 in the text draw area backing up somewhere, or alternatively not usimg a block copy. I prefer to use the copy as is as I think it's the most efficient approach for it. so I'll look into the first approach later. As it goes, I am not allocating any new buffers in AGA 2/3 mode since the bottom of the fast ram chunky buffer is still free.

The next thing to figure out is what to do in 1x2 mode. In fullscreen, you are a bit boned, but in 2/3 mode, there's no reason to apply the pixel doubling after the bottom of the 3D area.
Karlos is online now  
Old 13 May 2024, 20:45   #4491
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 1,977
@Karlos

top stuff!

I may have some time to build and test this on the A4000 tomorrow (depends on how long my hospital appointment takes I guess )
abu_the_monkey is offline  
Old 13 May 2024, 21:08   #4492
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
It has taken far longer than it should have because I'm lucky to get 10 minutes every few days lol
Karlos is online now  
Old 13 May 2024, 21:14   #4493
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 1,977
time. there never seems to be enough of it to do the fun stuff

but at least you have made some great progress in bringing all the major features in line across the different modes
abu_the_monkey is offline  
Old 13 May 2024, 21:22   #4494
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
There's an issue in 320x240 RTG mode. Essentially, the text draws over the bottom of the HUD. I suspected this would be the case.

It looks too weird having the 3D area right at the top, so I think that we should move the HUD lower border to the top of the display when on a 240 high screen. That gives enough space on the bottom for the current amount of text output (4 lines plus one for overflow).

Attached a mock of how that might look at 240. I don't think we should aim to support resolutions below 240, to be honest.

Also there's the N pages ago idea of an in-display HUD for fullscreen that I still want to do at some juncture.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2024-05-13 20-21-46.png
Views:	33
Size:	31.3 KB
ID:	82208   Click image for larger version

Name:	mock240.png
Views:	29
Size:	40.1 KB
ID:	82209  

Last edited by Karlos; 13 May 2024 at 21:33.
Karlos is online now  
Old 13 May 2024, 21:33   #4495
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 1,977
no doubt 320x200 will be even worse in that respect.

could the 'letter boxing' be use to develop the extra space required? just throwing out ideas that spring to mind.
abu_the_monkey is offline  
Old 13 May 2024, 21:59   #4496
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
I dunno. Maybe 320*200 is okay in full screen with an in-display HUD, but there's definitely no real point to it in 2/3 because you aren't saving anything performance wise. We don't redraw the whole display in 2/3 mode, just the small window and any border elements that updated. And now a message block too. Which on AGA is just a single bitplane at that.
Karlos is online now  
Old 14 May 2024, 00:36   #4497
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 1,977
Quote:
Originally Posted by abu_the_monkey View Post
no doubt 320x200 will be even worse in that respect.

could the 'letter boxing' be use to develop the extra space required? just throwing out ideas that spring to mind.
what I meant by this is, in 320x240 even in full screen you have to reduce the screen size by using the letter box feature, so, if you have selected a screen mode less that 320x256 force the max letter box to whatever makes it fit and in 2/3 mode leaves enough space below the render area and draw the text from where the 3d render area ends.

hope that makes some sense.
abu_the_monkey is offline  
Old 14 May 2024, 02:42   #4498
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 664
Quote:
Originally Posted by abu_the_monkey View Post
what I meant by this is, in 320x240 even in full screen you have to reduce the screen size by using the letter box feature, so, if you have selected a screen mode less that 320x256 force the max letter box to whatever makes it fit and in 2/3 mode leaves enough space below the render area and draw the text from where the 3d render area ends.

hope that makes some sense.

I was thinking about this. I think it may be a good idea to dynamically place and size the render window. For instance, I believe the HUD still leaves room at the bottom for the text scrolling we no longer use thanks to Karlos’ efforts. Also, in 320x240 and 320x200 the letterbox is not centered and one has to reduce the vertical size quite a lot, so much so that there’s no output at the top just to make the HUD reappear.
pipper is online now  
Old 14 May 2024, 08:53   #4499
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,234
Definitely, the layout needs to be more adaptive, especially at lower screen height.

I'm going to try and finish the 2/3 text stuff today for 320*256. I don't want to muddy the waters just yet. Since that means pretty much just fixing the border corruption, I'm hopeful I can find that 10 mins during a break
Karlos is online now  
Old 14 May 2024, 16:42   #4500
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 1,977
Hi Karlos,

I could not get the latest build from misc/messages-redux to run in AGA screenmode.

I just get a black screen when starting a level. It is working in the background and I can esc back to the main menu and quit using '*'

RTG is working with the same builds, I only tried the release 020 and 040 versions.

Is worth posting a binary for someone else to test on a different 'real' amiga as mine can be a bit flaky ( I noticed today all the fast ram sockets have let go and do not hold the simms in place properly anymore )

edit: just so you know, the same build is working in winuae in AGA screen mode just not on my real A4000.

Last edited by abu_the_monkey; 14 May 2024 at 16:53.
abu_the_monkey 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
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

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 00:45.

Top

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