Welcome, Guest. Please login or register.

Author Topic: New improved intuition.library version from the Kickstart 3.1  (Read 74439 times)

Description:

0 Members and 9 Guests are viewing this topic.

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Quote from: Cosmos;771831
Another example who make coders cry : R_DrawImage
Wow, that's some amazing crapz0r code right there :( Compilers that produce such crap should be burned :(
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Re: New improved intuition.library version from the Kickstart 3.1
« Reply #1 on: August 28, 2014, 02:20:13 AM »
Quote from: TheMagicM;771869
68k is even moreso a dead-end than PPC..
Everything Amiga is a dead end, except for hobby purposes, which is fine with me. I'm not into Amiga because it's going to get up to date, I have a peecee for that.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Re: New improved intuition.library version from the Kickstart 3.1
« Reply #2 on: August 28, 2014, 10:23:51 AM »
Quote from: olsen;771880
Excuse me, this is very little code to judge the compiler by. You're looking at one toenail of the left forepaw of the elephant, so to speak.
Okay, perhaps it's crap because it was compiled from crap C code? This crap had to come from somewhere, and if it's the compiler's fault, then that's not good. After all, if such simple code is already crap, then what on earth is it going to do with more complex code?

If it's the programmers fault, then they should've been fired :D

Quote from: olsen;771880
If you want to critique the quality of the Intuition code, please cast your eye on the meat, bones and nervous system of the beast.
That's going to be hard without the source code, isn't it?
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Re: New improved intuition.library version from the Kickstart 3.1
« Reply #3 on: August 28, 2014, 01:54:29 PM »
To olsen:

Perhaps you're right, but I'm a 68k coder and when I see crap code like that I can't help but think what I wrote earlier.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Re: New improved intuition.library version from the Kickstart 3.1
« Reply #4 on: August 28, 2014, 09:18:57 PM »
Quote from: Thomas Richter;771905
But look, this is exactly the difference between a "coder" and a "software engineer".
Bollocks.

Quote from: Thomas Richter;771905
In essence, the "register-ping-pong" costs pobably like 20-30 cycles per function per call, probably in total around 400 cycles.
I understand that, it's just impossible to look at code like that, and not think how crappy that is, and comment on it.

Quote from: Thomas Richter;771905
Consider that in perspective with the amount of cycles you can save by *not* copying a cliprect by an improved algorithm.
Yeah, the right algorithm. You told me this before, and it was just as obvious then as it is now. You assume again that I don't understand that, while it's an open door of obviousness.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Re: New improved intuition.library version from the Kickstart 3.1
« Reply #5 on: August 29, 2014, 06:30:44 AM »
Optimizing that crap code example Cosmos showed is still useful, simply because it's easier to read :)

What would you rather deal with in your source code, this:

Code: [Select]
R_DrawImage
    move.l  d1,-(sp)
    move.l  d0,-(sp)
    move.l  a1,-(sp)
    move.l  a0,-(sp)
    jsr     _DrawImage
    lea     $10(sp),sp
    rts

_DrawImage
    move.l  d2,-(sp)
    move.l  8(sp),d0
    move.l  $C(sp),d1
    move.l  $10(sp),d2
    clr.l   -(sp)
    clr.l   -(sp)
    move.l  $1C(sp),-(sp)
    move.l  d2,-(sp)
    move.l  d1,-(sp)
    move.l  d0,-(sp)
    bsr.w   _DrawImageState
    lea     $18(sp),sp
    move.l  (sp)+,d2 ; make the wrong CCR for BenchTrash 1.73
    rts
Or this:

Code: [Select]
R_DrawImage
    clr.l   -(sp)
    clr.l   -(sp)
    move.l  d1,-(sp)
    move.l  d0,-(sp)
    move.l  a1,-(sp)
    move.l  a0,-(sp)
    bsr.w   _DrawImageState
    lea     $18(sp),sp
    rts
« Last Edit: August 29, 2014, 06:37:18 AM by Thorham »
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Re: New improved intuition.library version from the Kickstart 3.1
« Reply #6 on: August 29, 2014, 07:34:15 AM »
Quote from: Thomas Richter;771976
Nothing. It goes right into SYS:Trashcan. That code is not source code, and its not for reading. I don't maintain code at that level.
You don't, because you don't write in assembly language. Cosmos is obviously using assembly language, so that shorter, cleaner code is an improvement. Not to mention that he's probably working with a resourced intuition.library. Making the code more readable is important.

Quote from: Thomas Richter;771976
That's easy to read, it's not assembly because it is not needed
Assembly language IS needed when you LIKE assembly language. That's all that's relevant when you're doing something as a hobbyist, that you like what you're doing.

I'll say again: Hobbyists write in assembly language because they like doing that. If you don't like assembly language, then that's perfectly fine.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show all replies
Re: New improved intuition.library version from the Kickstart 3.1
« Reply #7 on: August 29, 2014, 08:51:11 AM »
Quote from: Thomas Richter;771978
But as I already said, that's the wrong approach to begin with. If you want to rewrite intuition, you're moving on dangerous ice by taking the disassembly of the original. You don't "remove copyright" by this activity. Instead, reverse engineer from the interface (which is actually well documented). AROS does that - perfectly fine. So why doesn't he contribute there?
That's a good point.