English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 12 July 2011, 03:48   #21
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
@Don Adan

mfilos cannot get a boot : if some removed code are really usefull, I'll put it back of course !
Cosmos is offline  
Old 12 July 2011, 12:56   #22
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,002
Quote:
Originally Posted by Cosmos View Post
No entry point = code not called = code not used => deleted...
I don't know your experience in resourcing of 68K files (especially binary), but if you think that no direct entry code, can not be called that you are wrong. Here is resourced DOS from ROM 3.0 and almost all code has access. This version is perhaps correctly resourced, but I'm not checked this exactly. You can easy found how all (?) routines are accessed.

Quote:
Originally Posted by StingRay View Post
Haha, amusing. If your patches would have the same quality as your cursing they'd be quite usable. But yeah, I won't comment here anymore, have fun "optimising" all the system libraries.
I think similar, for me resourced version of every ROM parts must be available for check by other coders, due more bugs can be found in original or optimised code or wrong ROM resourcing. Anyway Cosmos made something, other coders are too lazy.
Attached Files
File Type: lzx DOS30.lzx (41.1 KB, 203 views)

Last edited by TCD; 12 July 2011 at 13:34.
Don_Adan is offline  
Old 12 July 2011, 13:21   #23
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Don_Adan View Post
I think similar, for me resourced version of every ROM parts must be available for check by other coders, due more bugs can be found in original or optimised code or wrong ROM resourcing.
Cosmos deleted his post so my comment is out of context now. He told me to go to hell just because I pointed out obvious flaws of his approach to resource/"optimise" dos.library. It's especially funny considered that I often helped him with code when he had questions.

Quote:
Originally Posted by Don_Adan View Post
Anyway Cosmos made something, other coders are too lazy.
It would be better if he wouldn't "optimise" system libraries by deleting "unused" code at will. He's not optimising, he's destroying these system libraries. But well, since I didn't want to comment here anymore, I'll stop here.
StingRay is offline  
Old 12 July 2011, 13:37   #24
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,002
Quote:
Originally Posted by StingRay View Post
Cosmos deleted his post so my comment is out of context now. He told me to go to hell just because I pointed out obvious flaws of his approach to resource/"optimise" dos.library. It's especially funny considered that I often helped him with code when he had questions.



It would be better if he wouldn't "optimise" system libraries by deleting "unused" code at will. He's not optimising, he's destroying these system libraries. But well, since I didn't want to comment here anymore, I'll stop here.

First step for optimise/fix Amiga ROM parts is 100% correctly resourced version of Amiga ROM. When I resourcing ROM 3.0/3.1 I found some traps for people without knowledge, of course I'm not 100% sure if my version is correctly resourced. Only a few lines of Amiga ROM is perhaps unused, all other parts has direct or hidden access to data/code.
Don_Adan is offline  
Old 12 July 2011, 19:12   #25
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
>It's especially funny considered that I often helped him with code when he had questions

WHAT ??

Few years ago, you promise me the Kickstart 3.0's sources. I sent you an A4000 Kick 3.9 on eprom for free to thanks you.
And after you refused to search these sources on your CDs/DVDs...


>he's destroying these system libraries

C/C++ compilators produce a lot of unused code... Ask some other disassembler coder here, they'll say my same words !

Why keeping unused code ?

Remember that Rom space is small on our Classic, every unused bytes removed are important : why this evidence is so hard to understand for your mind ?
Cosmos is offline  
Old 12 July 2011, 19:37   #26
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Cosmos View Post
WHAT ??

Few years ago, you promise me the Kickstart 3.0's sources. I sent you an A4000 Kick 3.9 on eprom for free to thanks you.
And after you refused to search these sources on your CDs/DVDs...
That's an outright lie! First: I never PROMISED you anything and I didn't REFUSE to search for anything. So shut your mouth and stop telling bullshit, thanks.

And as for your "WHAT ??", how often did you ask for help in a certain coders channel? Already forgotten, eh?



Quote:
Originally Posted by Cosmos View Post
>
C/C++ compilators produce a lot of unused code... Ask some other disassembler coder here, they'll say my same words !
I don't need to ask any other "disassembler coder" here, I know enough about disassembling myself.


Quote:
Originally Posted by Cosmos View Post
>
Why keeping unused code ?
IF and only IF the code is unused, then there's no problem to remove it. But since in your world every routine that has no entry point is "unused" I wouldn't trust ANY of your disassembled code.

Quote:
Originally Posted by Cosmos View Post
>
Remember that Rom space is small on our Classic, every unused bytes removed are important : why this evidence is so hard to understand for your mind ?
Oh dear.... You should first learn more about disassembling and/or coding in general, then you might understand certain things. Maybe.
StingRay is offline  
Old 13 July 2011, 01:38   #27
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,378
Quote:
Originally Posted by Cosmos View Post
AJL_0_204E6 is called more than 60 times (and all the time with arg_d0), so I changed d1 by d0...

I'll see & trace R_DeleteVar......
OK, if there are other references to AJL_0_204E6 with D0 as argument, then, of course, this forces to use your fix. Anyway, these numbers are looking like DOS error codes, probably for IoErr() or RC2, so not really a big bug if they are wrong. But you will know that already if you really analyze the code before you change it, do you? --- Btw, DeleteVar() is only trashing memory in case of a failure. Thanks for checking that!
PeterK is offline  
Old 13 July 2011, 02:18   #28
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,378
Quote:
Originally Posted by Don_Adan View Post
First step for optimise/fix Amiga ROM parts is 100% correctly resourced version of Amiga ROM. When I resourcing ROM 3.0/3.1 I found some traps for people without knowledge, of course I'm not 100% sure if my version is correctly resourced. Only a few lines of Amiga ROM is perhaps unused, all other parts has direct or hidden access to data/code.
In order to ensure that the disassembled code of a library is 100% correctly resourced you must be able to recompile it again without any DC.W instructions in the code areas (except for alignments) and the resulting executable should be 100% identical with the original after adjusting the hunk order and the RELOC handling. I would never start modifying any code if I can't reproduce such a 100% working reference code at the beginning.

Concerning unused or dead code:
In most libraries is some dead code without any reference from any function. And if you really made a 100% correctly recoded version first and then analyzed every ASM line you will know if there are "hidden" references or not. And if not, you can safely delete it or replace it with by an Alert() message. But sometimes, there are large parts of the code without being necessary for any good reason. For example, in the icon.library 45.1 there exists some code for unlocking the AWeb Special Edition which comes bundled with OS 3.9. And there are some Easter Eggs, some gimmicks made by the author of the library, which can be removed, of course, since only the author will know how to trigger and enjoy them.
PeterK is offline  
Old 13 July 2011, 03:58   #29
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
StingRay play with words, end of discuss : you are not ready for anything... Go do nothing for Amiga computers and get out of my life...
Cosmos is offline  
Old 13 July 2011, 05:18   #30
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
@all

Some explanations of what I'm doing into this library :


Original code from the v40.3

Quote:
R_SetIoErr ; 54 bytes
move.l d1,d0
move.l d2,-(sp)
move.l d0,d2
moveq #-1,d1
bsr.b JL_0_204F8
move.l (sp)+,d2
rts

JL_0_204F8
bsr.b JL_0_20484
lea $38(a0),a0
bra.b JL_0_2050C

JL_0_20484
move.l 4.w,a0
move.l $114(a0),a0
add.w #$005C,a0
rts

JL_0_2050C
tst.l d1
bne.b JL_0_20516
move.l (a0),d1
move.l d1,d0
rts

JL_0_20516
move.l (a0),d1
move.l d2,(a0)
move.l d1,d0
rts


Now in the v40.4b1

Quote:
R_SetIoErr ; 20 bytes
move.l 4.w,a0
move.l $114(a0),a0
move.l $38+$5C(a0),d0
move.l d1,$38+$5C(a0)
move.l d0,d1 ; d0 must be mirrored in d1
rts

More than two times faster... So my reworked libraries are usefull and not pointless !

Last edited by Cosmos; 13 July 2011 at 05:35.
Cosmos is offline  
Old 13 July 2011, 07:47   #31
Skope
Protracker
 
Skope's Avatar
 
Join Date: Sep 2008
Location: 8364
Posts: 381
Quote:
Originally Posted by Cosmos View Post
StingRay play with words, end of discuss : you are not ready for anything... Go do nothing for Amiga computers and get out of my life...
Skope is offline  
Old 13 July 2011, 09:51   #32
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Cosmos View Post
StingRay play with words, end of discuss
Go and look for a job as politician, would be the perfect job for you! First you spread LIES and then it's me who's playing with your words, classic!

Fact is, you are a LIAR and all of your patches are of dubious quality. They can be trusted as much as your words.

Why don't you open a public SVN/GIT repository and commit your code for everyone to see?

There might be a reason why almost only people who are no coders use your patches. 'Nuff said.

Quote:
Originally Posted by Cosmos View Post
: you are not ready for anything...
That sentence is almost correct, one of us is indeed not ready to disassemble and "optimise" system libraries.


Quote:
Originally Posted by Cosmos View Post
Go do nothing for Amiga computers and get out of my life...
Haha good joke. I do indeed prefer to do nothing instead of claiming I have "size optimised" certain libraries when I don't know what I'm doing. I could post some of your questions you asked me here so people would see how good a coder you are...

I for example fondly remember how you asked about detecting expansion boards with board.library. Who was it who gave you the code after a few minutes? And I didn't have any docs about that library, just like you. But contrary to you, I know what I'm doing when it comes to disassembling certain system libraries so I didn't have any problems to give you working code which you happily took. So really, shut your mouth.



Quote:
Originally Posted by Cosmos View Post
More than two times faster... So my reworked libraries are usefull and not pointless !
How about posting the routines you have "optmised", read: removed from the library instead of boasting about your "optimising" skills Mr. "shorter code is always faster"?
StingRay is offline  
Old 13 July 2011, 09:59   #33
Cosmos
Banned
 
Join Date: Jan 2007
Location: France
Posts: 655
I said the thruth, you play with words, not me...

And no shame to ask silly questions sometimes, no shame to be a beginner, I started from zero...

Most of the time on this thread, you don't know about what you are talking...

The best way for you is : do nothing... And thank you for that !
Cosmos is offline  
Old 13 July 2011, 10:10   #34
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by Cosmos View Post
I said the thruth, you play with words, not me...
Ok, here we go:

Quote:
Originally Posted by Cosmos View Post
Few years ago, you promise me the Kickstart 3.0's sources.
That's the first of your lies. I never promised you anything, I said I'll check my backups if I still have these sources. Not more, not less.

Quote:
Originally Posted by Cosmos View Post
I sent you an A4000 Kick 3.9 on eprom for free to thanks you.
That's the second of your lies, it's indeed true that you sent me a ROM but not to thank me, you just asked if I wanted a ROM and I said "why not".


Quote:
Originally Posted by Cosmos View Post
And after you refused to search these sources on your CDs/DVDs...
And since the best things come in threes here's your 3rd lie. I didn't refuse to search and told you countless times that I checked quite a few of my backups already but didn't find them so far. I'm sorry that I'm not as obsessed with these sources as you are.


So much for "playing with words".




Quote:
Originally Posted by Cosmos View Post
And no shame to ask silly questions sometimes, no shame to be a beginner, I started from zero...
No, there is no problem asking questions, everyone has to start somewhere. And I started from zero too mind you.


Quote:
Originally Posted by Cosmos View Post
Most of the time on this thread, you don't know about what you are talking...
Hahahahaha. I take all back, don't look for a job as politician, go look for a job as comedian, your jokes are quite good.

You have no clue what you are doing but you don't want to admit it.
So again: Why don't you open a public GIT/SVN repository so everyone can see your code?


Quote:
Originally Posted by Cosmos View Post
The best way for you is : do nothing... And thank you for that !
Yeah, another good joke. At least I don't release countless dubious patches and claim I have "optimised" system libraries. And I let other people comment if I do "nothing" or not.
StingRay is offline  
Old 13 July 2011, 10:17   #35
Skope
Protracker
 
Skope's Avatar
 
Join Date: Sep 2008
Location: 8364
Posts: 381
Stingray is one of the most competent Amiga reverse engineers on the planet, why would you even start some shit like that with him? He's contributed more fixes to the amiga community than you have entered ascii chars in this thread, yet I haven't seen that much by you to be honest.

Don't get me wrong, it's really nice you're doing stuff and are atleast trying to hack that lib, just don't say he's doing nothing for the Amiga and that he's not ready for it. That's just ridiculous.

2 cents deposited.
Skope is offline  
Old 13 July 2011, 11:10   #36
_mandark_
Registered User
 
Join Date: May 2011
Location: Funeralopolis
Posts: 91
Isn't this thread supposed to be about the dos.library? Now it turned into a flamewar who is the better coder and who is not.

Though I am no Amiga coder I am more interested in dos.library than in idle talk from both sides...
_mandark_ is offline  
Old 13 July 2011, 12:16   #37
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,002
Quote:
Originally Posted by PeterK View Post
In order to ensure that the disassembled code of a library is 100% correctly resourced you must be able to recompile it again without any DC.W instructions in the code areas (except for alignments) and the resulting executable should be 100% identical with the original after adjusting the hunk order and the RELOC handling. I would never start modifying any code if I can't reproduce such a 100% working reference code at the beginning.
Right, but it works only for exe files. Also different assemblers, make different opcode for this same source. You can check for example ASMOne and DevPac output files.
I checked a few more my resource and DOS library has much more bugs. Seems that minimum two coders works on this library, one (worst) uses next style of coding:
moveq #$69,D0
rol.l #1,D0
second (better) uses
moveq #$69,D0
add.l D0,D0
The best for ROM (short code) and 68000 (fast code) is
moveq #$69,D0
add.w D0,D0

One time I found only
moveq #$69,Dx
perhaps add.w Dx,Dx is missing and this is perhaps next bug.
This routine can be also handled by D1 due before error (AJL_0_204E6) routine is also move.l D1,D0, but of course D0 version is much better (shortest/fastest).

Quote:
Originally Posted by Cosmos View Post
@all

Some explanations of what I'm doing into this library :


Original code from the v40.3





Now in the v40.4b1




More than two times faster... So my reworked libraries are usefull and not pointless !
Yes, fastest, but it will be works OK if you have/use correctly resourced DOS library or will be crash due you change size and place of code.

Last edited by TCD; 13 July 2011 at 12:37.
Don_Adan is offline  
Old 13 July 2011, 16:50   #38
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,378
>>...the resulting executable should be 100% identical with the original after adjusting the hunk order and the RELOC handling....

Quote:
Right, but it works only for exe files. Also different assemblers, make different opcode for this same source. You can check for example ASMOne and DevPac output files.
Hmm, what are you disassembling Don_Adan ?? Compressed pictures or databases ??
I thought we were talking about executables, like libraries, or don't we. Libraries usually start with a MOVEQ #-1,D0 and RTS to prevent direct execution.

Different assemblers should not make different opcode as long as you switch all optimization options off when you're reproducing the reference version of the code.

Quote:
The best for ROM (short code) and 68000 (fast code) is
moveq #$69,D0
add.w D0,D0
Ok, maybe good for 68000, but WORD size is bad for WinUAE, because PCs always need an extra prefix byte for WORD access, and that's slower than LONG.

Quote:
....or will be crash due you change size and place of code.
If you really built a 100% working reference library first before starting to change any code, as I tried to explain above, then there should be no hidden access left and you can even move some functions or pieces of code to other locations if you like. This should work as long as the code is not encrypted somehow.
PeterK is offline  
Old 13 July 2011, 17:48   #39
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Cosmos, don't let Stingray and the others deter you. You're doing a good thing here no matter what methods you use or how you go about it
Leffmann is offline  
Old 13 July 2011, 17:52   #40
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Hooray for a typical Leffmann post! Praise everything no matter how bad it is. That's what we need. \o/
StingRay 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
Open-source dos.library Don_Adan Coders. System 273 02 September 2020 00:42
execute function from dos.library Foul Coders. Asm / Hardware 5 08 August 2012 17:56
dos.library Open() hangs MrD Coders. Asm / Hardware 15 24 July 2012 19:55
graphics.library 40.25 beta series Cosmos Coders. General 337 22 July 2011 18:15
Dos.library question. Thorham Coders. General 2 11 January 2011 21:03

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

Top

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