Search found 3132 matches

by thefox
Fri Nov 30, 2018 10:46 pm
Forum: NES Hardware and Flash Equipment
Topic: MMC5 Hacking Adventures
Replies: 343
Views: 204804

Re: MMC5 Hacking Adventures

Another question for you -- How does the IRQ interact with V-blank? As I understand, V-blank and IRQ are 2 separate interrupts, each with their own vector. Can an IRQ interrupt happen from within a V-blank interrupt? A normal IRQ can happen within V-blank as long as the interrupt disable flag in th...
by thefox
Sun Nov 25, 2018 12:00 am
Forum: NESemdev
Topic: PAL NES, sprite evaluation and $2004 reads/writes
Replies: 24
Views: 29311

Re: PAL NES, sprite evaluation and $2004 reads/writes

Sorry for the additional bump, but I'm trying to get a better understanding of the PAL timings indicated by these results compared to prior testing referenced in the wiki. On the errata page, the wiki says OAM is inaccessible from scanlines 21 through 70, but these results seem to contradict that, ...
by thefox
Fri Nov 23, 2018 10:33 pm
Forum: NESdev
Topic: Expanding PRG space in MMC3
Replies: 7
Views: 8249

Re: Expanding PRG space in MMC3

tepples wrote:It appears to cover the last 2 PRG ROM banks (except the last 288 bytes), for use when the P bit of $8000 is clear (0). This leaves room for ENDPRG which is presumably init code.
(63*0x2000 + 0x3ee0 + 0xe0 + 0x3a + 0x6) bytes = 520 kilobytes. Probably the size should be $1ee0.
by thefox
Sun Nov 18, 2018 2:43 am
Forum: NESdev
Topic: Expanding PRG space in MMC3
Replies: 7
Views: 8249

Re: Expanding PRG space in MMC3

theinfamousmrmeow wrote:

Code: Select all

    PRG:       start = $c000, size = $3ee0, file = %O ,fill = yes, define = yes;  # main.c
Why is this so large?
by thefox
Sat Nov 17, 2018 4:17 am
Forum: Newbie Help Center
Topic: JSNes and running your rom in a browser.
Replies: 9
Views: 8747

Re: JSNes and running your rom in a browser.

I would go for an Emscripten-based emulator (asm.js/WebAssembly) such as https://github.com/ryanwmoore/fceux for better performance.
by thefox
Fri Nov 16, 2018 10:40 am
Forum: Newbie Help Center
Topic: Is there a clever way to do small random numbers?
Replies: 26
Views: 13866

Re: Is there a clever way to do small random numbers?

One simple way is to mask it down into a power of two, then use rejection sampling.

So if you want 0..5, generate the number 0..255, mask it down to 0..7 (use bitwise AND), then reroll if the result is 6 or 7.
by thefox
Fri Nov 09, 2018 11:35 pm
Forum: NES Hardware and Flash Equipment
Topic: NESRGB issue, weird colors. Any NESRGB experts out there?:)
Replies: 13
Views: 11599

Re: NESRGB issue, weird colors. Any NESRGB experts out there

My knowledge of EE stops at soldering, but... it looks to me like the BG is using the sprite palettes. That suggests the EXT pins are fine, and whatever the NESRGB uses to tell the sprites from the BG (the EXT pins don't carry that information) is wonky. IIRC that's the composite on pin 21, and som...
by thefox
Thu Nov 01, 2018 2:07 pm
Forum: Newbie Help Center
Topic: MacOs build with nesasm not working?
Replies: 4
Views: 5759

Re: MacOs build with nesasm not working?

I think that's the first example program from Nerdy Nights. Indeed it doesn't work on real NES as intended, but I recall at least some version of FCEUX (erroneously) producing a blue screen when running it. Another way to fix it is to also set the grayscale bit together with the "blue" bit...
by thefox
Thu Oct 25, 2018 10:09 am
Forum: NESdev
Topic: Best practices for instancing?
Replies: 24
Views: 14961

Re: Best practices for instancing?

pwnskar wrote:

Code: Select all

lda #PROJECTILES_RAM+#PROJECTILE_STATE, x[/quote]
OT, but what's up with that second "#". Does this code compile in your assembler of choice?
by thefox
Wed Oct 10, 2018 2:31 pm
Forum: NESdev
Topic: CA65: generating debug labels for multiple banks (fceux .nl)
Replies: 4
Views: 5997

Re: CA65: generating debug labels for multiple banks (fceux

If you speak C, there's an "official" library for parsing the debug files at https://github.com/cc65/cc65/tree/master/src/dbginfo
by thefox
Sun Oct 07, 2018 12:57 pm
Forum: NESdev
Topic: Dynamically generating ld65 config files
Replies: 13
Views: 10198

Re: Dynamically generating ld65 config files

Oh, I didn't realize that was a limitation. That's a bit of a pain. Why wouldn't it work with SEGMENTs? :( I have no idea why SYMBOLS don't work with SEGMENTs, but I simply couldn't make it work... ld65 says the values must be constant, which as far as I can tell, they are, since the values of the ...
by thefox
Sun Oct 07, 2018 7:21 am
Forum: Newbie Help Center
Topic: Local variables - performance vs comfort
Replies: 7
Views: 8662

Re: Local variables - performance vs comfort

I'll always go for the "fast and dangerous" option. Although it would be nice if there was some compiler support to make it easier. So far what I've done is to manage everything manually and set up some Lua scripts (= no overhead) to check at runtime for violations (same variable used from...
by thefox
Mon Oct 01, 2018 1:17 pm
Forum: NESdev
Topic: Dynamically generating ld65 config files
Replies: 13
Views: 10198

Re: Dynamically generating ld65 config files

I also chose to dynamically generate the linker configuration file for similar reasons. I decided to use Python to generate the file, though (https://github.com/fo-fo/ngin/blob/master/tools/linker-configurer/linker-configurer.py), as I already had dependencies to it in my project. I believe Movax (t...
by thefox
Mon Oct 01, 2018 1:12 pm
Forum: NESdev
Topic: How to spawn enemies with multi-directional scroll?
Replies: 12
Views: 7547

Re: How to spawn enemies with multi-directional scroll?

I've used the "object list sorted by X, another list of indices to the first list sorted by Y" approach. I keep track for each edge which object is the next that should spawn in that direction, and once it spawns (or is too far away in the perpendicular direction) I move the pointer forwar...
by thefox
Sun Sep 16, 2018 3:15 am
Forum: NESemdev
Topic: Best NES emulator for macOS?
Replies: 8
Views: 13317

Re: Best NES emulator for macOS?

OpenEmu seems quite nice, thanks!

Kind of strange how the "built-in" homebrew games work, though. It wants to download the game again every time I start it.