English Amiga Board


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

 
 
Thread Tools
Old 05 November 2018, 14:11   #681
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by plasmab View Post
Many things..
The OS helps you out and does this for you.
The OS can be disabled as you (hopefully) know.

Quote:
So why hand roll it?
Because YOU asked how it can be done!

Quote:
Second.. you’re probably doing it wrong if you are mixing code and data to the extent you need to. That’s what sections are for. Or hard disks!
Again, YOU asked how this can be done so I'm not doing something wrong here, at least nothing you could judge as you didn't see any of my code.

Also, how is it "mixing code and data" when calling code in a different section? And what have hard disks to do with all this?

Quote:
Valid does not mean something isn’t a hack.
Sure, but so far you failed to give any valid reason why this is a hack!

Last edited by StingRay; 05 November 2018 at 14:17.
StingRay is offline  
Old 05 November 2018, 14:17   #682
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Originally Posted by ross View Post
I usually do this way:
Code:
l   move.l  #farcode-l,d0
    jmp     l(pc,d0.l)

    ds.b 100000

farcode nop ;my dist>32k code
Man, this had my head spinning, until I realized that 'l' was a label, and not the number one
hooverphonique is offline  
Old 05 November 2018, 14:23   #683
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by StingRay View Post
The OS can be disabled as you (hopefully) know.



Because YOU asked how it can be done!



Again, YOU asked how this can be done so I'm not doing something wrong here, at least nothing you could judge as you didn't see any of my code.

Also, how is it "mixing code and data" when calling code in a different section? And what have hard disks to do with all this?


Sure, but so far you failed to give any valid reason why this is a hack!


Disabling the OS is usually a sign of a hack right there. I wrote 68k games as a teenager using this method. It’s pretty much the definition of bad coding.

Why call code in different sections? Clean code would keep its code in one section and data in another.

Another massive hack is incbin. I read that as “I’m too lazy to load something from disk properly”

Anyways this is off topic. Hackers are hackers everywhere and they never learn. Or listen. Fortunately thesesays I get to fire them.
plasmab is offline  
Old 05 November 2018, 14:28   #684
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by plasmab View Post
Disabling the OS is usually a sign of a hack right there. I wrote 68k games as a teenager using this method. It’s pretty much the definition of bad coding.
Sure...

Quote:
Why call code in different sections? Clean code would keep its code in one section and data in another.
Of course. Which is why each assembler only allows exactly one CODE section *cough*.

Quote:
Another massive hack is incbin. I read that as “I’m too lazy to load something from disk properly”
That's complete and utter nonsense. It is somewhat funny though.

Quote:
Anyways this is off topic. Hackers are hackers everywhere and they never learn. Or listen. Fortunately thesesays I get to fire them.
That doesn't mean you're good in your job.
StingRay is offline  
Old 05 November 2018, 14:34   #685
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by StingRay View Post
Sure...



Of course. Which is why each assembler only allows exactly one CODE section *cough*.
This is wrong. Vasm at least lets you have multiple code sections. Some for ROM, RAM etc.

Quote:
That's complete and utter nonsense. It is somewhat funny though.


That doesn't mean you're good in your job.


Hackers always say this.
plasmab is offline  
Old 05 November 2018, 14:40   #686
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by hooverphonique View Post
Man, this had my head spinning, until I realized that 'l' was a label, and not the number one
eh, sorry, bad choice
I simply used the first label that came to my mind.
ross is offline  
Old 05 November 2018, 14:46   #687
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by plasmab View Post
Disabling the OS is usually a sign of a hack right there. I wrote 68k games as a teenager using this method. It’s pretty much the definition of bad coding.
There are good reasons to do this and then it's not bad coding.
It's bad only when done where it shouldn't.


Quote:
Originally Posted by plasmab View Post
Another massive hack is incbin. I read that as “I’m too lazy to load something from disk properly”
So you distribute one extra file for every block of, say, 2kb tables ?
Incbin is not a hack, and it's a magnitude better than all these huge constant blocks often seen in C programs.
Not to mention it's a gem when developing (you have example data readily available).
meynaf is offline  
Old 05 November 2018, 14:57   #688
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by plasmab View Post
Hackers are hackers everywhere and they never learn. Or listen. Fortunately thesesays I get to fire them.
You've probably never met valid "hackers". Or they were just script kiddies.
(anyway first probably we need a definition for "hackers" or "crackers", but very OT..)

Only two categories: good coders, not so good coders.
There are "hackers " in both categories.

Having to choose I take the good coder that is also an hacker.
It gives me added value and is certainly curious enough to improve and adapt.

He simply will not do the "hacking" if it's not the case
ross is offline  
Old 05 November 2018, 14:58   #689
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by meynaf View Post
There are good reasons to do this and then it's not bad coding.

It's bad only when done where it shouldn't.
Agreed. However I find that there isn’t very good judgement on this. Simply wanting to write a game isn’t usually justification enough.





Quote:

So you distribute one extra file for every block of, say, 2kb tables ?

Incbin is not a hack, and it's a magnitude better than all these huge constant blocks often seen in C programs.

Not to mention it's a gem when developing (you have example data readily available).

Partially agree. I’d argue for generating tables where I can. But sine tables etc. ok fair enough.

Incbin topaz.font or sprites.iff is a hack though. That’s both lazy and makes updating the game annoying.
plasmab is offline  
Old 05 November 2018, 15:05   #690
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by ross View Post
You've probably never met valid "hackers". Or they were just script kiddies.
(anyway first probably we need a definition for "hackers" or "crackers", but very OT..)

Only two categories: good coders, not so good coders.
There are "hackers " in both categories.

Agreed. Good coders feel guilty when they hack is the difference. They leave comments and say this is a hack. Bad coders argue and say it’s valid.
plasmab is offline  
Old 05 November 2018, 15:08   #691
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by StingRay View Post
Of course. Which is why each assembler only allows exactly one CODE section *cough*
Quote:
Originally Posted by plasmab View Post
This is wrong. Vasm at least lets you have multiple code sections. Some for ROM, RAM etc.
uh, irony button has remained invisible! we need to fix forum code
Sorry I could not resist
ross is offline  
Old 05 November 2018, 15:14   #692
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by plasmab View Post
Good coders feel guilty when they hack is the difference. They leave comments and say this is a hack. Bad coders argue and say it’s valid.
On this I agree. But the boundary is subjective and variable.
There is inevitable hack, there's evitable hack.. The point is not abuse it.
ross is offline  
Old 05 November 2018, 15:31   #693
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by plasmab View Post
Agreed. However I find that there isn’t very good judgement on this. Simply wanting to write a game isn’t usually justification enough.
Yes, sadly this has been abused too many times already.


Quote:
Originally Posted by plasmab View Post
Incbin topaz.font or sprites.iff is a hack though. That’s both lazy and makes updating the game annoying.
Well, i would not call this a hack. Rather, it's using the wrong tool to do the job, IOW a bad programming practice.

A hack is something else, it's some trick that takes the risk of not working for whatever reason (like using undocumented features, relying on some specific timing, etc).
meynaf is offline  
Old 05 November 2018, 15:40   #694
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Incbin topaz.font or sprites.iff is a hack though. That’s both lazy and makes updating the game annoying.
You're still funny. First you claim incbin is a hack, now you say that using incbin for certain files is a hack. Interesting to see how you contradict yourself.

Quote:
Originally Posted by plasmab View Post
This is wrong. Vasm at least lets you have multiple code sections. Some for ROM, RAM etc.
Read again what I wrote and especially the "cough" remark. I might have added it for a reason.

Quote:
Hackers always say this.
Of course. Then again, someone who "fires hackers" should at least be able to come up with valid reasons why something would be a hack.
StingRay is offline  
Old 05 November 2018, 16:04   #695
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by StingRay View Post
You're still funny. First you claim incbin is a hack, now you say that using incbin for certain files is a hack. Interesting to see how you contradict yourself.

Of course. Then again, someone who "fires hackers" should at least be able to come up with valid reasons why something would be a hack.

I reserve the right to change my opinions. There are exceptions to everything.

I have a different personal definition of hacks to @meynaf. But I can see why he has his definition.

Mine includes where the wrong tool is used for the job. Usually this is laziness and that’s when start thinking about firing.
plasmab is offline  
Old 05 November 2018, 16:12   #696
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by plasmab View Post
I reserve the right to change my opinions.
I have already noticed as you do that quite often.


Quote:
Originally Posted by plasmab
Mine includes where the wrong tool is used for the job. Usually this is laziness and that’s when start thinking about firing.
Using a wrong tool for a certain job should indeed be avoided. However, if people do that, instead of firing them, one sh/could teach them how to do it properly.

Last edited by StingRay; 05 November 2018 at 16:17.
StingRay is offline  
Old 05 November 2018, 16:26   #697
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by StingRay View Post
I have already noticed as you do that quite often.
Thank you. Its called growth and development.

Quote:

Using a wrong tool for a certain job should indeed be avoided. However, if people do that, instead of firing them, one sh/could teach them how to do it properly.

I try. But as I say the bad coders don’t listen and they argue that what they’ve done is valid. That it works. That’s usually good enough for them.
plasmab is offline  
Old 05 November 2018, 17:15   #698
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
Quote:
Originally Posted by meynaf View Post
C is quite ugly, with all its curly braces everywhere (and meaningless : closing braces don't tell the type of block they end), parenthesis overload because of stupid operator priority, etc.
Perhaps even Basic is (visually at least) a lot more beautiful.
Basic? That claim is simply ridiculous.

C is a brilliant programming language. Elegant, simple, and easy to learn yet advanced enough to be able to do anything imaginable.

C++ code can be hideously ugly. Painfully slow compilation time, difficult to read, and just awful, in my opinion. Although it does have some useful features missing in C, I personally wish it was never invented.
Hewitson is offline  
Old 05 November 2018, 17:35   #699
plasmab
Banned
 
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by Hewitson View Post
Basic? That claim is simply ridiculous.

C is a brilliant programming language. Elegant, simple, and easy to learn yet advanced enough to be able to do anything imaginable.

C++ code can be hideously ugly. Painfully slow compilation time, difficult to read, and just awful, in my opinion. Although it does have some useful features missing in C, I personally wish it was never invented.

C++ gives you the ability to control resource lifetime with scope. Its personally my favourite language. When used properly it’s amazing. The Amiga is too slow for it though. I have 12 years commercial experience with C++. It’s fading a little now. Although C++17 looks great I doubt I’ll get to play with it. I’m onto other higher languages now.

I always got cranky when devs hand rolled slow and crap versions of the STL in C. It’s a painful and expensive waste of time.

The purists will want assembler but for everything else there is C++.
plasmab is offline  
Old 05 November 2018, 17:49   #700
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Quote:
Originally Posted by Hewitson View Post
Basic? That claim is simply ridiculous.
It may look ridiculous, but it's still true. Nearly anything looks better than C, even Basic.


Quote:
Originally Posted by Hewitson View Post
C is a brilliant programming language. Elegant, simple, and easy to learn yet advanced enough to be able to do anything imaginable.
Sorry, but C is a terribly poor language. It has nothing elegant, simple, and even though the language itself is easy to learn, you can not do much with it without having to use more hard to learn libraries.
It has awful syntax with parenthesis overload, illogical operator priorities, meaningless closing curly braces.
And its total lack of dynamic sized strings/arrays make it unsuitable as high level language.
And for low level, well... asm is faster and can do everything without having to do dirty tricks.


Quote:
Originally Posted by Hewitson View Post
C++ code can be hideously ugly. Painfully slow compilation time, difficult to read, and just awful, in my opinion. Although it does have some useful features missing in C, I personally wish it was never invented.
Most of what's written in C will also work in C++ so you're not forced to use the extra features.
meynaf 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
Any software to see technical OS details? necronom support.Other 3 02 April 2016 12:05
2-star rarity details? stet HOL suggestions and feedback 0 14 December 2015 05:24
EAB's FTP details... Basquemactee1 project.Amiga File Server 2 30 October 2013 22:54
req details for sdl turrican3 request.Other 0 20 April 2008 22:06
Forum Details BippyM request.Other 0 15 May 2006 00:56

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

Top

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