Search found 218 matches

by Nicole
Tue May 02, 2017 2:17 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

You should not rely on the state of anything at powerup and reset. I/O register contents and WRAM/VRAM/CGRAM contents can potentially be anything at power-on, and generally keep their values across resets. In addition, if someone is using a flashcart to run your ROM on the real console, the flashcar...
by Nicole
Sun Apr 30, 2017 3:57 pm
Forum: NESdev
Topic: Why did they choose the 2A03 as the CPU for the NES?
Replies: 11
Views: 5696

Re: Why did they choose the 2A03 as the CPU for the NES?

Page 2 of this interview explains that Ricoh was the only company with the necessary manufacturing capacity available at the time, due to PCs getting big in Japan. It also mentions that it was Ricoh's engineers who apparently recommended the 6502, though it doesn't go into much detail as to why.
by Nicole
Sun Apr 30, 2017 2:13 pm
Forum: SNESdev
Topic: Some basic questions...
Replies: 55
Views: 17017

Re: Some basic questions...

An important distinction here, which I'm not sure if you're aware of, is the difference between master cycles and CPU cycles . The numbers you've been talking about are master cycles, not CPU cycles. For NTSC, these cycles run on a ~21.477 MHz clock. However, CPU cycles are different. Depending on t...
by Nicole
Sat Apr 29, 2017 5:05 pm
Forum: SNESdev
Topic: Super NES EMULATOR SE dev question
Replies: 32
Views: 13266

Re: Super NES EMULATOR SE dev question

Your ROM file does seem fine, though the header claims the ROM is 256 KB when it's actually 32 KB, and the checksums haven't been set. My guess is that the ROM size is the problem, and it should be zero-padded out to 256 KB. I don't own a SD2SNES, but at least on the Super EverDrive, I've had proble...
by Nicole
Fri Apr 28, 2017 10:57 am
Forum: SNESdev
Topic: Super NES EMULATOR SE dev question
Replies: 32
Views: 13266

Re: Super NES EMULATOR SE dev question

You forgot a # before JOYH_LEFT and JOYH_RIGHT.
by Nicole
Wed Apr 26, 2017 5:21 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

at whatever part of the file maps to $00FFB0-$00FFDF. That is one of the tricky parts, though, because unless you know ahead of time what that mapping is (e.g. known ROM hashes), you can't figure out that mapping without doing some guesswork. This involves judging whether the data at file offset 0x...
by Nicole
Wed Apr 26, 2017 4:01 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

nicklausw wrote:changing the ROM type in the header from $30 to $20 (you had it set to HiROM, I believe?)
Nah, $30 means fast LoROM, versus $20 for slow LoROM (whereas HiROM is $21 or $31). Having $30 there shouldn't be an issue.
by Nicole
Wed Apr 26, 2017 3:43 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

The color #$001f is in fact red, not green, and that's what's being written, so it sounds like it's actually working in that case.
by Nicole
Wed Apr 26, 2017 3:05 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

Another problem I see is that you use jsr to call your init code, but that's where you set up the stack, so rts won't return you back where you were, because the stack pointer is no longer pointing at the address you need to return to. You should probably jmp to the init code, and jmp back instead. ...
by Nicole
Wed Apr 26, 2017 2:55 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

I notice that your init code already turns off forced blanking. That might be interfering with your writes to $2122, since they're probably not happening during Vblank/Hblank.
by Nicole
Wed Apr 26, 2017 2:51 pm
Forum: SNESdev
Topic: Super NES EMULATOR SE dev question
Replies: 32
Views: 13266

Re: Super NES EMULATOR SE dev question

What they mean is, autoreading doesn't start until a little bit after vblank, so HVBJOY can show up as "ready" from the previous frame before it becomes "not ready". It's better to wait for it to not be ready, and then wait for it to be ready, to make sure you don't end up readin...
by Nicole
Wed Apr 26, 2017 10:59 am
Forum: SNESdev
Topic: Super NES EMULATOR SE dev question
Replies: 32
Views: 13266

Re: Super NES EMULATOR SE dev question

Hang on, you have the software for the Emulator SE? Last I heard, people haven't been able to find that anywhere; is there a chance you could upload it somewhere?
by Nicole
Wed Apr 12, 2017 9:04 pm
Forum: NESdev
Topic: FDS .qd format?
Replies: 12
Views: 15974

Re: FDS .qd format?

I remember hearing something along the lines of Nintendo actually patching this stuff at run-time, rather than modifying the actual game images themselves. There's already evidence they've done stuff like this with the Virtual Console in things like EarthBound, which mitigates certain screen-flashin...
by Nicole
Fri Apr 07, 2017 9:20 pm
Forum: SNESdev
Topic: Why did Super Mario RPG and Kirby Super Star use an SA-1?
Replies: 81
Views: 29516

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

It seems HuCards (the cartridge format for the PC Engine) generally ranged from 256 KB to 1 MB. Apparently there was only a single PC Engine game on HuCard larger than 1 MB, namely Street Fighter II' clocking in at 2.5 MB. As for writing slow code, it depends. Of course there are things that, for in...
by Nicole
Sun Mar 19, 2017 11:59 am
Forum: SNESdev
Topic: Execution of main loop in emulator.
Replies: 6
Views: 3003

Re: Execution of main loop in emulator.

So, the main issue here is that the CPU and APU don't run at the same rate at all; they don't even use the same clock . For NTSC, everything with the CPU and PPU is based on master cycles with a rate of 21.44727 MHz. So, for instance, a fast CPU cycle is six master cycles (~3.58 MHz), and it takes t...