Search found 152 matches

by FinalZero
Wed Sep 28, 2011 8:35 pm
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Questions again: 1) How does one set segments/banks (including the .nes header) with cc65? 2) How is the switch/case statement implemented in cc65? I'd check myself, but I can't get anything to compile... 3) In cc65, when an address is pushed onto the stack, does it take of two bytes?, thus increasi...
by FinalZero
Fri Sep 23, 2011 8:10 pm
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Correct. Only two players would be possible in a game using Super NES controllers through SNES-to-NES adapters. Were you thinking three players as in Jeopardy! or three players as in Secret of Mana? Because if you have three 16-pixel-wide players in one place, anything around them will start to fli...
by FinalZero
Fri Sep 23, 2011 4:57 pm
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Any emulator supporting the Four Score adapter can be used with NES games supporting the Super NES controller. Player 1 A: SNES B Player 1 B: SNES Y Player 1 Select, Start, Up, Down, Left, Right: SNES same Player 3 A: SNES A Player 3 B: SNES X Player 3 Select: SNES L Player 3 Start: SNES R One coul...
by FinalZero
Thu Sep 15, 2011 2:13 pm
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

A couple new questions:
1) How does one set segments/banks (including the .nes header) with cc65?
2) What happens if the .nes format header is present on a real rom and played in a real NES?
by FinalZero
Tue Sep 13, 2011 12:52 pm
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Bits A14-A0 of the CPU address bus are on the cart edge. A15 isn't directly made available, but it can be inferred from A14, Phi2, and PRG /CE. Bankswitching can affect any address in $4020-$FFFF but most commonly affects $8000-BFFF, $8000-$DFFF, or $8000-$FFFF depending on the mapper. It also comm...
by FinalZero
Mon Sep 12, 2011 9:13 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

The NES doesn't have a big enough address bus to see all of the ROM at once. How big is its address bus? Isn't it two bytes? Or is it half that?, since the PRG only goes from 0x8000 to 0xFFFF. So instead, the CPU writes a "page number" of sorts to various I/O ports on the mapper to tell i...
by FinalZero
Mon Sep 12, 2011 3:56 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

I don't understand the question. Size of that region is always 8K. Again, THEORETICALLY, a cart can have bank switching features that allows to switch RAM/ROM/your momma in that region. For example, FME-7 allows to map ROM in that area as well. For the most part, that area is used for 8K RAM expans...
by FinalZero
Mon Sep 12, 2011 12:35 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Because standard practice in C, especially in existing programs originally developed for platforms other than the NES, is to use a stack far bigger than 256 bytes. Doesn't the NES already have a stack at $0100–$01FF ? Why does C use it's stack for? Is it just stored in normal memory, or someplace s...
by FinalZero
Fri Aug 05, 2011 10:27 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Anyways, can I get help with my linker error? I can't even find a file named "zerobss.s", "copydata.s", "condes.s", or "crt0.s". * * * Edit: I found what I was talking about earlier. It seems he was talking about inline assembly only. Note: Do not embed the as...
by FinalZero
Fri Aug 05, 2011 9:58 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

That's normal C behavior.
So now I know. I do most of my programming in C++, and it seems that I'm always ambushed by something that works differently in C.
Read where? I don't think there's any other way to do it.
It was either in the mailing correspence or on the website.
by FinalZero
Fri Aug 05, 2011 6:10 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Another question: What size does cc65 make enums? Please don't tell me they're int's by default. Is there a way to specify the size? This is long-overdue imo; at least they're adding it to C++0x. Hopefully C starts supporting it too.
by FinalZero
Wed Aug 03, 2011 4:15 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

these became defined in terms of uint8_t and friends. Ick, ugly. I don't see anything wrong with how C# decided to name it's primitives. volatile I thought volatile didn't do anything in cc65. If the header segment is overflowing, perhaps someone or something forgot to switch to the code segment. N...
by FinalZero
Wed Aug 03, 2011 3:36 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

Thanks. So, my latest error is a linker one: "Error: Input file 'nes.lib' not found". However, I'm confused because I've already set CC65_HOME. Anyways, cheating and just putting nes.lib in the same directory, it's now complaining about the header segment overflowing, though I don't know w...
by FinalZero
Wed Aug 03, 2011 2:48 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

You want me to rewrite your assembly code into C or you just have a problem with something certain? If you don't know how to read/write a memory location from C, just use a pointer, like: No, I already know how to do that. I meant the loading, shifting, and rolling. C doesn't have a rolling operato...
by FinalZero
Wed Aug 03, 2011 1:38 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61218

.repeat 8 lda GamepadARaw ; Bit 0 == Current Button Status shr ; Bit 0 of Raw -> Carry rol GamepadA ; Bit 0 of Storage <- Carry .endrepeat How would I even do this part in C? I think it is a good idea to read docs about things like this. For function like gamepad read, which does on have input para...