logo
 drop

Main

Community

Submissions

Help

86194797 visitors

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BRPXQZME

Pages: 1 ... 28 29 30 31 32 [33] 34 35 36 37 38 ... 111
641
ROM Hacking Discussion / Re: bad coding in roms
« on: December 18, 2012, 02:27:10 am »
>> is logical or arithmetic depending on the signedness of a variable.

I thought I had clarified that, but it turns out it got deleted at one of the draft stages. I’m in finals mode and shouldn’t be posting at the moment :P

642
ROM Hacking Discussion / Re: bad coding in roms
« on: December 18, 2012, 02:08:38 am »
examples:
x = 0 = 0x00000000
temp = x >> 31 = 0x00000000
x^temp-temp = (0^0)-0 = 0-0 = 0

x = 1 = 0x00000001
temp = x >> 31 = 0x00000000
(x^temp)-temp = (1^0)-0 = 1-0 = 1

x = -1 = 0xFFFFFFFF
temp = x >> 31 = 0xFFFFFFFF
(x^temp)-temp = (0xFFFFFFFF^0xFFFFFFFF)-0xFFFFFFFF = 0-(-1) = 1

x = -3 = 0xFFFD
temp = x >> 15 = 0xFFFF
(x^temp)-temp = (0xFFFD^0xFFFF)-0xFFFF = 0x0002-(-1) = 3

^ is a bitwise XOR in C, in case that isn’t clear.

Basically, it all works off several ideas:
- To negate a number in two’s complement, you flip the bits and add 1.
- XOR changes a value if you mask with a 1, and leaves alone if you mask with a 0.
- For a non-negative number, shift-extending the sign bit throughout all bits gives you a mask of all zeroes or ones
- Thus, XORing all bits in a number with its sign bits will flip the bits if the number is negative, and let it be otherwise
- Subtracting by negative one is the same as adding by negative one; adding zero wastes a little time but hurts nothing.
- You’re only bothering to do these extra operations because the time cost is peanuts compared to what branching might do. In general, on modern pipelining / branch-predicting architectures, it is worth replacing a single if statement with a couple of arithmetic statements if you can manage it.

644
ROM Hacking Discussion / Re: bad coding in roms
« on: December 18, 2012, 12:33:12 am »
Modern processors like what? :huh:

Anyway, this implementation is really only for architectures with branch slot delay like MIPS and... SPARC, I guess, out of all the things you’re likely to ever code on. For performance purposes, branching is something to avoid in general unless you are seriously starved for bytes (in which case, why are you using a RISC processor anyway?). For most uses nowadays a generic integer absolute is best accomplished by something like:
Code: [Select]
long abs(long x) {
long temp = x >> LONGSIGNBITSHIFT; // (sizeof(long)<<3)-1, which is 31 on a lot of current archs
return (x^temp)-temp;
}
which inlines to three instructions on most architectures if you don’t need to save anything.

645
Gaming Discussion / Re: Does Call of Duty have a story?
« on: December 17, 2012, 10:16:16 pm »
Yeah, the controls were what threw me off. But I mean, we’re talking a very similar run-up-walls idea—it’s not an easy thing for them to get working, and of course it’s going to feel better after a decade of playtesting.

Also, since there is such a focus on good lighting, the graphics still look pretty decent for a game of its age.

646
ROM Hacking Discussion / Re: bad coding in roms
« on: December 17, 2012, 09:52:59 pm »
Silly MIPS trick to do absolute value in 8 bytes instead of 12:

bgtz a0, label
label:
subu a0, zero, a0
(but that should...

no wait...)

>witchcraft.gif

edit: When I did MIPS for a class in high school, we actually did have to know about the delay slot. When I took the same class at college level (because there simply isn’t anything that transfers like that), we had to program like it didn’t exist and I was like aw come onnnn!

Of course, my guess is you would want to avoid a branch on a modern pipelining processor but I’m no expert or anything.

647
General Discussion / Re: The Hobbit??
« on: December 17, 2012, 09:41:16 pm »
I see. Maybe Sony should be in the business of making computers, maybe then they’d anticipa——

oh right

648
Gaming Discussion / Re: Does Call of Duty have a story?
« on: December 17, 2012, 05:19:54 pm »
I started up Splinter Cell a while back, but I had just come off of AC:B and it was like playing an ancient prototype version with tougher controls and guns and highly unskippable cutscenes and dying more often.

649
General Discussion / Re: Last version of Mozilla Thunderbird
« on: December 17, 2012, 05:14:36 pm »
http://forums.mozillazine.org/viewtopic.php?f=29&t=2526221

But wow, I haven’t really heard of anyone closing windows that way in like... 20 years.

650
General Discussion / Re: The Hobbit??
« on: December 17, 2012, 05:09:42 pm »
OS X has had some surprisingly obscure words in the spelling dictionary for as long as I’ve been using it.

651
General Discussion / Re: The Hobbit??
« on: December 17, 2012, 02:15:59 pm »
It’s kind of like the Old Testament (not coincidentally, either).

Also, Silmarillion is actually recognized by my spell checker. Huh.

652
Site Talk / Re: Hosting Videos on RHDN
« on: December 17, 2012, 02:12:09 pm »
If a video has been removed, you'd get a big black box or something to that effect on our entry pages.
You can use the YouTube API to just check that the video is up (and still the same video, and still embeddable...) every once in a while.

Doesn’t get rid of the other administrative headaches, but this part is simple enough.

653
Gaming Discussion / Re: Re: Gaming Progress Thread
« on: December 17, 2012, 02:02:13 pm »
Did I mention that shirt my classmate got in Japan? Well, lately? Of course I’ve mentioned it.

THIS’S MY PRIDE AND I’M BELIEVING TO IT

Too bad I no longer have a reference photo.

654
Kinda, yeah. Certainly more than one could attribute to a mere port.

655
No, it was a remake.

656
Site Talk / Re: Hosting Videos on RHDN
« on: December 16, 2012, 11:22:44 pm »
Accepting direct video submissions would be fairly difficult due to bandwidth and encoding difficulties.

Now what you could do is have people upload to YouTube themselves, and once it’s all done processing you could have someone download the stream, then reupload to a moderated account. Problem: this is technically against YouTube’s TOS.

One foreseeable issue is that you would need to be very, very careful about what videos are allowed this way, because the three-strikes policy can be extra nasty and I take it there will be no funds for legal defense here. In fact, most raw video game videos (without appropriate commentary or other transformative natures such as parody) probably aren’t fair use and only stay up due to an industry-wide willingness to look the other way very very often.

Basically, I think it’d be nice, but the technical and potential legal issues make this more of a headache than it’s worth IMHO.

657
General Discussion / Re: The Hobbit??
« on: December 16, 2012, 11:03:45 pm »

Well, double dumbass on you!

658
General Discussion / Re: Is anyone here allergic to gluten?
« on: December 16, 2012, 05:29:35 pm »
He was doing it as a performance artist kind of thing to do for his documentary. He could have just ordered salads but that was not the agenda.

However, the documentary was inspired by some people suing fast food companies for making them fat (not only did they lose these suits, but some states now have laws on the books to punish such egregious wastes of the public’s time).

659
General Discussion / Re: The Hobbit??
« on: December 16, 2012, 05:08:22 pm »
Just as a point, Radagast is mentioned at least once in the main fiction though I forget whether it's in The Hobbit or in the Ring trilogy. It's really just an offhand mention though; there's never any development of his character.

The necromancer is mentioned, too. Gandalf splits with the party as they enter Murkwood and goes south to fight him, but it's similarly never really developed in the book. I was always kind of curious about that.
IIRC, these are both told off-hand by Gandalf himself in LotR. In which case you’d be right on both counts.

660
General Discussion / Re: The Hobbit??
« on: December 16, 2012, 08:17:52 am »
I haven’t seen the movie, but I know the book pretty well.

- There is no appearance of elves at all in the book.
There is more than one appearance of elves in the book.

- You don't ever see any goblins outside of the caverns in the book
The goblins are seen outside their lair more than once.

- The party doesn't enter the cavern by chance like they do in the movie, they planned to go through it all the way along because going in the mountains would be too hazardous (or something in the like, I'm not totally sure)
You’re probably mixing up the Hobbit with FotR. They did not (and would never!) plan to cross the mountains that way.

- The cavern where they find the rare swords and the cavern where they get trouble with goblins, and where gollum live, is the same and only cavern
Nope. One of them is chapter 2, the other is 4-5.

- The giant spiders doesn't appear before the other side of the huge forest, so they should not appear in this movie.
Well, it happens roughly halfway into the book, so it wouldn’t take too much fudging.

Now I imagined the dwarves being really tiny, something about like 50cm high, much smaller than the hobbit. In the movie they almost appear like humans, considering there is no human it's hard to make a comparison but they don't look tiny at all. This could have been my imagination though - I don't remember how tolkien described them. I also imagined them as funny creatures, something very far from the badass look they have in the movie.
4 paragraphs in: “what is a hobbit? I suppose hobbits need some description nowadays, since they have become rare and shy of the Big People, as they call us. They are (or were) a little people, about half our height, and smaller than the bearded Dwarves.”

Pages: 1 ... 28 29 30 31 32 [33] 34 35 36 37 38 ... 111