English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 11 July 2024, 18:38   #181
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,284
Quote:
Originally Posted by Karlos View Post
I really don't think that'd be wise, tbh
Well, then don't threaten us with a good time BTW I would recommend some kind of solid state replacement for the spinning drive, but don't know what works in tower setup, for my normal wedge A1200 I use a CF->IDE adapter.
paraj is offline  
Old 11 July 2024, 18:49   #182
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
What I really should use for it is a SCSI bridge. The BlizzPPC has a SCSI controller.
Karlos is offline  
Old 11 July 2024, 19:27   #183
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,284
You don't have to get everything set up perfectly. Just enough to run timing tests. Even just a gotek drive would probably do for that if it's otherwise working OK.

Having some way of doing really cycle accurate measurements yourself is just so good/necessary/satisfying when you're theory crafting.

For "classic" A500 stuff I really wish I had a real (working) machine, but WinUAE is good enough for that. Even for plain A1200 it's just not accurate enough if you /really/ want the actual numbers.
paraj is offline  
Old 11 July 2024, 22:31   #184
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
Any possible attempt to start up the 1200 would have to wait until the weekend. It did boot up last time I tried it a few years ago, but my old CRT has seen better days.
Karlos is offline  
Old 11 July 2024, 23:39   #185
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,068
I do have an A1200T with an apollo 1240@40mhz with 32mb fast memory in storage.

if I get the time I will dig it out.
it also has a CV643D so should work with the CF card from the stock A4000.
abu_the_monkey is offline  
Old 12 July 2024, 00:23   #186
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,068
@Karlos

what is the minimum required to run the test? will it fit on a floppy disk?
if the disk drive on the 1200T still works it would save pulling it apart.
abu_the_monkey is offline  
Old 12 July 2024, 00:47   #187
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
Quote:
Originally Posted by abu_the_monkey View Post
@Karlos

what is the minimum required to run the test? will it fit on a floppy disk?
if the disk drive on the 1200T still works it would save pulling it apart.
Sure. Just the binary and the airstrike.raw sound file I think. It'll need to be in a directory called sounds but none of the other sounds are needed atm

Last edited by Karlos; 12 July 2024 at 01:50.
Karlos is offline  
Old 12 July 2024, 20:08   #188
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,068
as requested, Apollo 1240@40 32mb
Attached Thumbnails
Click image for larger version

Name:	040_40_r.jpg
Views:	27
Size:	618.6 KB
ID:	82686  
abu_the_monkey is offline  
Old 12 July 2024, 20:12   #189
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,284
Great your doing these things @abu_the_monkey!

I haven't looked at the code (yet), but "Shift only" code path must be testing something other than I imagined.
paraj is offline  
Old 12 July 2024, 21:21   #190
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
Quote:
Originally Posted by paraj View Post
Great your doing these things @abu_the_monkey!

I haven't looked at the code (yet), but "Shift only" code path must be testing something other than I imagined.
It should be testing the idea that we are just applying a channel volume as a shift, rather than doing it as a lookup or multiply. The code converts the 8-bit sample in the fetch buffer to a 16 bit one by sign extending it to 16 bit then doing a left shift. The shift size is in a register. It's just a fixed amount at the moment, rather than actually calculated based on the channel L/R volumes.

See: https://github.com/0xABADCAFE/tkg-mi...040_asm.s#L714

@abu_the_monkey

Looks like my delta code is worse now. I think it's the extra work per sample, so I will have to see what it is like if the samples are pre-encoded for it. That would make the innermost loop a few less instructions.
Karlos is offline  
Old 12 July 2024, 21:25   #191
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
Maybe it would go faster if I used the full register rather than using .w and maybe LSL rather than ASL, after all, once the 8 bit was sign extended, it shouldn't matter.
Karlos is offline  
Old 12 July 2024, 21:27   #192
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
If it turns out that for reasons unknown shifting is not as good as lookup (crazy but...), I say lookup has the key advantage of being functionally equivalent to the multiplication.

Last edited by Karlos; 13 July 2024 at 00:56. Reason: Lol, typo
Karlos is offline  
Old 12 July 2024, 22:02   #193
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,068
Quote:
Originally Posted by Karlos View Post
If it turns out that for reasons unknown shitting is not as good as lookup (crazy but...), I say lookup has the key advantage of being functionally equivalent to the multiplication.
I can run it again to check it wasn't something I did during the test, but, I would have to wait till later this evening/tomorrow morning.
abu_the_monkey is offline  
Old 13 July 2024, 00:45   #194
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
Quote:
Originally Posted by abu_the_monkey View Post
I can run it again to check it wasn't something I did during the test, but, I would have to wait till later this evening/tomorrow morning.
I'm pretty sure that unless you decided to smash the CPU with something else halfway through, you didn't do anything to affect it.

I just realised I managed to type sh*tting and not shifting last time, lol

Last edited by Karlos; 13 July 2024 at 00:57.
Karlos is offline  
Old 13 July 2024, 11:58   #195
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,284
Don't think there's anything wrong with the testing, and can't see anything wrong with the code either.


I just don't understand how the shift version could possibly slower than the lookup method. It's a bit faster for 1 and 2 channels, but slower for 3+. I guess the cache is really helping the lookup for more channels, and there must be some kind of pipeline effect going on, but still.


Guess it really shows how one's intuition can be very wrong as soon as the CPU is even a bit more complicated than plain 68000.
paraj is offline  
Old 13 July 2024, 12:46   #196
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
I'm going to add a null mix test and a preconverted delta version. Hopefully the latter is even better than the straight lookup. Only one way to find out.
Karlos is offline  
Old 13 July 2024, 19:30   #197
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
Here's the proposed mixing code for the pre-encoded L1 : D15 format

Code:
.mix_first_sample:
        move.b  (a3)+,d0         ; next 8-bit sample.
        move.w  (a2,d0.w*2),d4   ; look up the volume adjusted word
        add.w   d4,(a4)+         ; accumulate onto the target buffer
        
        ; d4 contains the current 16-bit value
.mix_next_sample:
        move.b  (a3)+,d0         ; next delta in d0
        add.w   (a2,d0.w*2),d4   ; add lookup adjusted delta to current
        add.w   d4,(a4)+         ; Accumulate
        dbra    d1,.mix_next_sample
If it's not faster than the linear version, I'm going to pack up and go and live in a cave...

Last edited by Karlos; 13 July 2024 at 19:43.
Karlos is offline  
Old 13 July 2024, 20:00   #198
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
I've just pushed an updated version to test. It reorders the tests slightly to be a bit more logical

Test 0: Null Mixer - All source data fetches and chip data writes are performed (in the expected sizes and sequence), but no actual mixing or normalisation. This will hopefully give some sort of baseline for the IO aspect.

Test 1: The full multiplication path (060 target)

Test 2: The shift mixing path

Test 3: The 040 linear lookup path

Test 4: The 040 delta lookup path (on the fly delta)

Test 5: The 040 pre-encoded delta lookup

This last test preconverts the loaded data to ensure that the interaction with the tables (and thus the cache) is a realistic model.
Karlos is offline  
Old 13 July 2024, 20:34   #199
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
I should point out that I haven't strictly validated that the new method works but even if it has bugs, they're probably in the pre-encoder
Karlos is offline  
Old 14 July 2024, 00:06   #200
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,802
There was a bug in the pre-encoding, but not the actual mixer. In a completely unscientific test locally in UAE (no JIT), the pre-encoded version is basically the same speed as the linear version and faster than the on-the-fly delta. This is what I expect based purely on the number of operations per loop. How it performs on actual hardware, remains to be seen.

Changes are pushed.
Karlos 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
Slow A4000 after overhaul Screechstar support.Hardware 57 11 July 2023 23:02
Amiga Font Editor overhaul buggs Coders. Releases 19 09 March 2021 17:39
Escom A1200 overhaul Ox. Amiga scene 8 26 August 2014 08:54
Will Bridge Practice series needs an overhaul mk1 HOL data problems 1 02 April 2009 21:55

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 11:12.

Top

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