Page 2 of 2

Posted: Mon Dec 17, 2007 8:04 pm
by tepples
Celius wrote:I think the only reason that it doesn't look really bad is because the portrait is HUGE when displayed with the NES (96 pixels tall, 64 pixels wide).
That's part of why NES games such as Ninja Gaiden and the underrated Vice Project Doom pioneered the use of cut scenes: so that they could show more detailed characters.
But if I were to draw a large picture of an enemy that's only 2x4 tiles big, it wouldn't work so well. I'd have to draw the enemy small before scanning it.
That or use *shop to shrink it between scanning and converting.
One thing that makes me want to do SNESDev more than GBADev is that I know the 6502, and there isn't that much more to learn for the 65816.
The ARM architecture was designed as pretty much a 32-bit load-store successor to the 6502, and the assembly syntax shows it.
I would like to learn stuff for GBADev, it's just that I don't know C++. I have C and C++ for dummies, and there are still things that just do not make sense to me. The whole int main() thing just does not click. When I type that in to make a sample program, I don't know what exactly I'm saying in that line.
A C program is a set of subroutines, the kind you call with JSR in 6502. The "int main()" tells where a subroutine starts; "int" means that it leaves an 'int' (whole number) in the accumulator for the calling subroutine to pick up. When you do this:

Code: Select all

int main() {
  puts("hello world");
  return 0;
}
It compiles to something like this:

Code: Select all

.proc main
.segment "CODE"

  ; puts("hello world");
  lda #<helloStr
  sta 0
  lda #>helloStr
  sta 1
  jsr puts

  ; return 0;
  lda #0
  rts
.segment "RODATA"
helloStr: .asciiz "hello world"
.endproc
It's called "main" because every executable compiled with C contains a bit of reset code that does "JSR main".

Posted: Mon Dec 17, 2007 9:20 pm
by Celius
I'm sorry, the explanation of the "Int" leaves me still confused. What do you mean by "the calling subroutine"? I just don't see why "Int" needs to be there. That's short for integer, right?

And about the picture. I could shrink it in photoshop, it's just that it would turn out distorted, and may not even look like what I drew in the first place. I think drawing it small to start out would be better. When I first shrunk my painting, I could barely tell what I was looking at. I of course had to trace over the whole thing again.

Posted: Tue Dec 18, 2007 4:41 am
by Bregalad
Oh, my Celius it's amazing how you're able to Nintendoize images ! I couldn't do it look that good. I've nintendoized some portrait as well, always ending with mediocre results. The best way I found is to do it in black and white, and do the colors by hand. Did you did this ?

And yes, as for small enemies and so it's always beter to do them by hand. You'd want to draw them before to know what you're doing, but still draw the pixels by hand. I may be wrong tough.

And why would a reset code return something ? Since nobody ever calls the rest code (aka main procedure). I trought a main procedure would always be void type and never have any argument, else it really make no sense.

Posted: Wed Dec 19, 2007 2:47 pm
by tepples
Some posts have been split off into a new topic:
How do I shot C?