English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 16 January 2023, 14:02   #1
LittleSandra88
Registered User
 
LittleSandra88's Avatar
 
Join Date: Jan 2023
Location: Denmark
Posts: 36
Big grin Why is Hardwired so broken on AGA ?

Dear all =)

The Silents/Crionics demo Hardwired is a mater piece in many ways, but quite broken on faster Amiga's.

The loader seams(?) fine, but many effects finish too soon and some effect are not displayed correct. E.g. many of the dot effects have been flattened.

I have OSC demos that work perfectly that were even made before the release of the A1200.

Can someone explain what is wrong with Hardwired on faster Amiga's?

Hugs,
Sandra =)
LittleSandra88 is offline  
Old 16 January 2023, 14:08   #2
Seiya
Registered User
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,342
some demos was programmed with self-modifying code with bad effect on 68040 and 68060
Seiya is offline  
Old 16 January 2023, 14:14   #3
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,522
Which is why this exists: https://whdload.de/demos/CrionicsSilents_Hardwired.html
TCD is offline  
Old 16 January 2023, 14:30   #4
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,039
The loader (seems to) work fine because they overcompensated to ensure it runs on all drives: timings are above ultra safe, calibrations are frequent and act as a 5th audio channel :P (nothing too much wrong with that, but could've been done more reasonably).
When you push the hardware you usually have to make compromises and sometimes bad things happen on faster hardware. Sometimes you have a hard deadline. Sometimes you can't find your phone to dial 1-800-docbrown.
Many possible reasons, especially when you have ~5 coders working on it.
a/b is offline  
Old 16 January 2023, 14:47   #5
LittleSandra88
Registered User
 
LittleSandra88's Avatar
 
Join Date: Jan 2023
Location: Denmark
Posts: 36
Interesting. About the 5th audio channel. Is that why the ripped music is a custom format?

When using the music tracker for changing effect, I would have expected the demo to change effect correctly, as the music isn't played faster?

On my machine the WHD version seams to be the same as running is from disk?
LittleSandra88 is offline  
Old 16 January 2023, 15:28   #6
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by LittleSandra88 View Post
Can someone explain what is wrong with Hardwired on faster Amiga's?
Despite the nice effects, much of the code is quite bad/dirty, which causes a lot of problems. I hate the Hardwired code with a passion (bset #1,$dff02e still haunts me to this day).
StingRay is offline  
Old 16 January 2023, 15:30   #7
Torti-the-Smurf
Registered User
 
Torti-the-Smurf's Avatar
 
Join Date: Dec 2018
Location: Earth
Posts: 1,058
Quote:
Originally Posted by StingRay View Post
(bset #1,$dff02e still haunts me to this day)

Torti-the-Smurf is offline  
Old 16 January 2023, 15:34   #8
LittleSandra88
Registered User
 
LittleSandra88's Avatar
 
Join Date: Jan 2023
Location: Denmark
Posts: 36
Big grin

Quote:
Originally Posted by StingRay View Post
Despite the nice effects, much of the code is quite bad/dirty, which causes a lot of problems. I hate the Hardwired code with a passion (bset #1,$dff02e still haunts me to this day).
Is it the code that glues the effects together or the effects code that is bad?

I am guessing it is not simple 1:1 search/replace to fix this?
LittleSandra88 is offline  
Old 16 January 2023, 15:57   #9
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Some of the code is OK, some is less than OK and some of the code is really bad. The bset #1,$dff02e line for example, is responsible for a black screen when the "48 faces glenz" should be on screen.

It takes quite some time to fix the demo to work properly on all machines (which is why I still didn't finish the update WHDLoad patch for this very demo).

To give you a rough idea, you can check the ReadMe of the Desert Dream WHDLoad patch. For this one, I had to patch the disk version of the demo to gather the timing data which I then could use to fix the timing for all Amigas.
StingRay is offline  
Old 16 January 2023, 18:22   #10
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
They obviously knew there were issues on faster amigas. Funny excerpt from UAE changelog from a little while ago:
Code:
960105 Added AvailMem(), AllocMem(), AllocAbs() and FreeMem() dummies.
       The Hardwired demo times the multiplication instructions and prints
       "This demo don't like Axel" if they are too fast. Apparently, Axel has
       a 68040. Added a WANT_SLOW_MULTIPLY option to config.h.
       Fixed the fast blitter emulation (seems to work now).
I'm guessing they decided it had to run (well/at all) on 68k+512+512 and be finished for TP91, anything else being a bonus.
If even one coder didn't have regular access to a faster machine it's tough to debug this stuff. Understandably no one else is going to do it for them - have you ever seen OTHER PEOPLE's code? It's horrible
paraj is offline  
Old 16 January 2023, 18:41   #11
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,522
Quote:
Originally Posted by paraj View Post
The Hardwired demo times the multiplication instructions and prints
"This demo don't like Axel" if they are too fast. Apparently, Axel has
a 68040.
We should collect these gems from the WinUAE changelogs somewhere
TCD is offline  
Old 16 January 2023, 19:16   #12
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
I don't have any more good quotes off hand

FWIW in this case I think "Axel" doesn't refer to a person, but is meant to be short for "accelerator" (maybe there's a limit on the characters on that screen).

Actual timing loop:
Code:
00008016 0c39 0040 00df f006      cmp.b #$40,$00dff006
0000801e 66f6                     bne.b #$f6
00008020 23fc 0000 0cdc 0000 00fc move.l #$00000cdc,$000000fc
0000802a 4ff9 0000 7800           lea.l $00007800,a7
00008030 3e3c 00df                move.w #$00df,d7
00008034 7cff                     moveq #$ff,d6
00008036 ccc6                     mulu.w d6,d6
00008038 51cf fffc                dbf.w d7,#$fffc
0000803c 7a00                     moveq #$00,d5
0000803e 1a39 00df f006           move.b $00dff006,d5
00008044 0445 0040                sub.w #$0040,d5
00008048 0c45 0014                cmp.w #$0014,d5
0000804c 6a12                     bpl.b #$12        ; OK
So 224 multiplications and it has to take around 20 raster lines (~9k 7Mhz) cycles. Don't need a 040 for that to fail
paraj is offline  
Old 16 January 2023, 20:00   #13
LittleSandra88
Registered User
 
LittleSandra88's Avatar
 
Join Date: Jan 2023
Location: Denmark
Posts: 36
If if the Axel test succeeds, then the demo just run as fast as it can? And the parts that doesn't require 100% cpu will then finish sooner than planned?
LittleSandra88 is offline  
Old 17 January 2023, 18:33   #14
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
Quote:
Originally Posted by LittleSandra88 View Post
If if the Axel test succeeds, then the demo just run as fast as it can? And the parts that doesn't require 100% cpu will then finish sooner than planned?
No, at least with the original disks it just halts (e.g. on an A1200).
paraj is offline  
Old 19 January 2023, 13:42   #15
mnemo
MTN/SPT
 
mnemo's Avatar
 
Join Date: Sep 2019
Location: Germany
Age: 53
Posts: 61
Quote:
Originally Posted by LittleSandra88 View Post
Interesting. About the 5th audio channel. Is that why the ripped music is a custom format?
The music is a standard MOD, but it uses 256 song step entries while SoundTracker only allows 128. I guess Jesper Kyd copied the module to a "part 2" after a while when he realized he needed more song steps and then used the same sample set in this second module. The coders then took the additional song steps and patterns and modified the play routine to play 256 steps.

There is a "fixed" / combined version that uses the normal 128 steps done by Gryzor:
https://modarchive.org/index.php?req...id&query=44272

The "5th audio channel" is a joke by a/b, they were referring to the sounds of the floppy drive.
mnemo is online now  
Old 19 January 2023, 14:47   #16
Nobby_UK
Registered User
 
Nobby_UK's Avatar
 
Join Date: Jul 2013
Location: Liverpool
Posts: 2,595
Not working for me:
Attached Thumbnails
Click image for larger version

Name:	Image1.jpg
Views:	75
Size:	37.4 KB
ID:	77852   Click image for larger version

Name:	Image2.jpg
Views:	60
Size:	49.4 KB
ID:	77853  

Last edited by Nobby_UK; 29 March 2023 at 17:36.
Nobby_UK is offline  
Old 12 February 2023, 21:00   #17
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
In general (for anything coded before update X): software can only be backwards compatible, not future-compatible.

AGA wasn't too backwards-incompatible, and neither was KS3.0, but when you push the limits you can start to deviate from documentation.

To this is added that users or even bookstores couldn't just order the books. You basically had to have company and find their international number and phone them to order copies. And in the time it took for the documentation to arrive from Commodore-Amiga, and for a teenager to finally get it, many bad habits had time to form.

Few demos used self-modifying code. The slowmem of A500 is uncached, but there is no easy way (certainly not a documented one), to prevent other Amigas loading it into FastRAM, which on later CPUs would have an instruction cache and make self-modifying code more difficult to write (to execute as intended).
Photon 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
Hardwired demo crash Foul project.WHDLoad 2 06 December 2016 22:46
Broken Indivision AGA MK1 A1200? cv643d support.Hardware 1 02 September 2012 17:32
Hardwired VermillioN support.Demos 19 09 November 2011 23:12
Hardwired 2 (Silents) s2325 request.Demos 1 21 February 2010 23:58
Hardwired? SaphirJD support.Demos 3 02 December 2005 23:26

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 22:21.

Top

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