Search found 8728 matches

by rainwarrior
Tue Feb 27, 2024 4:57 pm
Forum: SNESdev
Topic: snes assembly - beginnings, a few questions (wla-65816)
Replies: 104
Views: 8129

Re: snes assembly - beginnings, a few questions (wla-65816)

What do PHB/PHP "secure" in this case? In the function call, PHP/PLP keeps the flags that are replaced by LDA/LDX/etc. though like I said earlier, I wouldn't normally expect to preserve these. I have no explanation for PHB/PLB, as I don't see anything in the code that would change these. ...
by rainwarrior
Tue Feb 27, 2024 12:59 pm
Forum: SNESdev
Topic: snes assembly - beginnings, a few questions (wla-65816)
Replies: 104
Views: 8129

Re: snes assembly - beginnings, a few questions (wla-65816)

I don't really understand when you need to pay attention to use it. If you write a function that saves and restores registers, you can call it anywhere without worrying about losing the current contents of them. Normally I would not do this, and would just assume A/X/Y are clobbered by a function c...
by rainwarrior
Tue Feb 27, 2024 6:03 am
Forum: SNESdev
Topic: snes assembly - beginnings, a few questions (wla-65816)
Replies: 104
Views: 8129

Re: snes assembly - beginnings, a few questions (wla-65816)

After performing RTI, does SEP #$30 mode return automatically? Yes, RTI restores the flags to their state at the time of interrupt. Interrupt pushes return address, bank, and flags on the stack, RTI pops and restores them. It's sort of like an RTL combined with a PLP. It's definitely a good idea to...
by rainwarrior
Sat Feb 24, 2024 5:25 pm
Forum: SNESdev
Topic: snes assembly - beginnings, a few questions (wla-65816)
Replies: 104
Views: 8129

Re: snes assembly - beginnings, a few questions (wla-65816)

So it works like an advanced, "automated" NES mapper that sees all Banks at once and automatically switches everything "on the fly" using long jumps/addressing? The 65816 is an extension of the 6502, so a lot of it works the same way. The same instructions are still there, and s...
by rainwarrior
Sat Feb 24, 2024 5:16 am
Forum: SNESdev
Topic: snes assembly - beginnings, a few questions (wla-65816)
Replies: 104
Views: 8129

Re: snes assembly - beginnings, a few questions (wla-65816)

No, code execution does not flow across banks. You have to use a long JMP or JSR to change the program bank. (There are other mechanisms for changing the data bank, or direct page.)
by rainwarrior
Fri Feb 23, 2024 6:36 pm
Forum: SNESdev
Topic: Trying to make the backmost sprites drop out first.
Replies: 42
Views: 2508

Re: Trying to make the backmost sprites drop out first.

The BSNES behaviour implementation can be read here: https://github.com/bsnes-emu/bsnes/blob ... t.cpp#L138

The tile counts if: the sliver is fully onscreen OR the sprite X coordinate is 256.

I haven't verified this with a hardware test.
by rainwarrior
Fri Feb 23, 2024 1:34 pm
Forum: SNESdev
Topic: snes assembly - beginnings, a few questions (wla-65816)
Replies: 104
Views: 8129

Re: snes assembly - beginnings, a few questions (wla-65816)

Does the code always have to be within one bank? There is no problem if, for example, a subroutine was on two banks at the same time, e.g. half at the end of one 32/64KB bank and the other half in the next one? Do you have to make sure that a given code does not go beyond the size of the bank? You ...
by rainwarrior
Fri Feb 23, 2024 1:31 pm
Forum: SNESdev
Topic: Trying to make the backmost sprites drop out first.
Replies: 42
Views: 2508

Re: Trying to make the backmost sprites drop out first.

So, if we use the always-present static HUD as the example again, if we know we will always want the HUD to be on top of every other sprite in the game no matter what other sprites are currently being displayed or where they currently are on the screen, there’s no practical preemptive way to make s...
by rainwarrior
Thu Feb 22, 2024 7:05 pm
Forum: SNESdev
Topic: snes assembly - beginnings, a few questions (wla-65816)
Replies: 104
Views: 8129

Re: snes assembly - beginnings, a few questions (wla-65816)

Oziphantom wrote: Thu Feb 22, 2024 4:44 am you get 64K banks which gives you more ROM space,
64 banks at 32K = 2MB
64 banks at 64K = 4MB
LoROM has 128 banks though, so they're both 4MB.

You do get more ROM space with ExHiROM though, which has almost 128 64k banks, half of them replacing the slow-ROM mirrored range of HiROM.
by rainwarrior
Thu Feb 22, 2024 6:35 pm
Forum: SNESdev
Topic: Trying to make the backmost sprites drop out first.
Replies: 42
Views: 2508

Re: Trying to make the backmost sprites drop out first.

Well, I ran some tests on real hardware, and it appears superfamicom.org was right, and the SNESDev wiki was wrong. It is the 32 lowest-index (highest-priority) sprites that get rendered, from the back (highest-index, lowest priority) frontwards until there's no more time to render slivers. I think...
by rainwarrior
Thu Feb 22, 2024 2:53 pm
Forum: General Stuff
Topic: My PC-9801 Series Documentation Project/Blog Post
Replies: 8
Views: 1538

Re: My PC-9801 Series Documentation Project/Blog Post

Oh yeah; I wanted to also take a moment to reply to rainwarrior's statement about two years ago without bumping that thread, so here it goes: Maybe PAL Amiga, or PC88 (sometimes) had close to 1:1? I think you could make a case that some european SNES developers might have worked with 1:1 PAR in D-P...
by rainwarrior
Mon Nov 27, 2023 5:37 pm
Forum: NES Hardware and Flash Equipment
Topic: Measuring APU DAC voltages via Test Mode
Replies: 6
Views: 2684

Re: Measuring APU DAC voltages via Test Mode

For comparison, a while ago I was trying to improve the DAC model with audio-only tests, though it didn't really have a satisfactory outcome. It didn't quite seem to match Blargg's formula, but it wasn't far off either, and I couldn't really come up with a sensible improvement based on my measuremen...
by rainwarrior
Mon Jun 19, 2023 5:35 pm
Forum: phpBB Issues
Topic: Notification about recent quotation by tepples in non-recent post?
Replies: 7
Views: 2157

Notification about recent quotation by tepples in non-recent post?

I have a notification about being quoted in this post that says: Mon Jun 12, 2023 6:35 pm However, there is no indication that the post above was edited. Normally posts will say "last edited at ..." at the bottom. It's a bit confusing to be notified for something like this. Is there some r...
by rainwarrior
Thu Apr 20, 2023 2:53 pm
Forum: NESdev
Topic: +two+two equals 5: A pass-count-dependent precognitive lexer hack in ASM6
Replies: 4
Views: 853

Re: +two+two equals 5: A pass-count-dependent precognitive lexer hack in ASM6

So, your capital T Two being used before it is declared is a forward reference, requiring the second pass? I was initially a bit confused as to what was different between the two listings until I looked very closely a couple of times. (The only non-comment difference in the one-pass version is that ...
by rainwarrior
Sun Apr 02, 2023 9:05 pm
Forum: NES Music
Topic: Old MMC5 PCM NSF audio test
Replies: 0
Views: 2174

Old MMC5 PCM NSF audio test

This is just to archive/document a test I made in 2012 and was still available at this famitracker forum thread . It's just an NSF with three tracks: song 1 = read-mode MMC5 PCM song 2 = write-mode MMC5 PCM song 3 = 2A03 DMC reference On each it plays a short looping voice sample. Source code is inc...