Search found 495 matches

by Bananmos
Wed May 13, 2020 11:10 am
Forum: NESdev
Topic: Compiled stack proposal
Replies: 22
Views: 1493

Re: Compiled stack proposal

Window Allocator I feel is a more correct term. As somebody who has built tree analysis and a Static Analyzer for 6502, this is not an easy thing to do in the uncontrolled environment of RAW ASM. Just working out "what is a function" as I do in the VICE debugger is only mostly accurate. That's why ...
by Bananmos
Wed May 13, 2020 7:04 am
Forum: NESdev
Topic: Compiled stack proposal
Replies: 22
Views: 1493

Re: Compiled stack proposal

In the common case, the call pseudo-instruction would call the subroutine and insert the metadata for you. Well, I was thinking it'd be nice if the system could just deduce it from parsing jsr instructions, without a need for the pseudo-instruction for most functions. But OTOH, if the preprocessor ...
by Bananmos
Wed May 13, 2020 4:33 am
Forum: NESdev
Topic: Compiled stack proposal
Replies: 22
Views: 1493

Re: Compiled stack proposal

@Bananmos : I'd say it's more 99% than 99.99% of the code. Although rarely useful, recursion can be useful in some rare cases. Yes, recursive algorithms have good uses even on the 6502. But again I would argue that even with a recursive algorithm, you'd probably re-write it to explicitly push / pul...
by Bananmos
Wed May 13, 2020 4:20 am
Forum: NESdev
Topic: Compiled stack proposal
Replies: 22
Views: 1493

Re: Compiled stack proposal

Nice to see this being picked up. Though I would probably suggest avoiding the *requirement* to specify / maintain calle-caller relationships. The point is after all to automate all of this for conveniency, and lots of new metadata requirements kind of work against that. They would lead to subtle bu...
by Bananmos
Wed May 13, 2020 4:16 am
Forum: NESdev
Topic: Aren't you afraid that NES Maker would just bring lazy noobs
Replies: 137
Views: 35310

Re: Aren't you afraid that NES Maker would just bring lazy noobs

By contrast I wouldn't even know how to start doing this with cc65... as there's no obvious way in the language to save the current address within a function to return to the same point of execution in the next frame - the C language was never designed for lightweight threading of concurrent actors...
by Bananmos
Tue May 12, 2020 9:15 am
Forum: NESdev
Topic: Aren't you afraid that NES Maker would just bring lazy noobs
Replies: 137
Views: 35310

Re: Aren't you afraid that NES Maker would just bring lazy noobs

I've found that C can be great for writing a main character's logic, as that often has a lot of complexity of different moves/attacks/etc, and isn't as likely to iterate through a loop of pointers/arrays. C is a lot worse for iterating over your enemies or other entities, as it does a terrible job ...
by Bananmos
Tue May 12, 2020 7:06 am
Forum: NESdev
Topic: Aren't you afraid that NES Maker would just bring lazy noobs
Replies: 137
Views: 35310

Re: Aren't you afraid that NES Maker would just bring lazy noobs

BUT! It's amazing. It's interesting how this machine is made. My first computer of childhood was Z80-based. And Z80 has big set of registers and the main problem with compilers is ignoring of register set. C compilers emits code load/saving memory for just incrementing and so on. But in the case of...
by Bananmos
Sun May 10, 2020 9:05 am
Forum: NESdev
Topic: Mesen Debugger - Feedback/Feature Requests? (2018 edition)
Replies: 187
Views: 97192

Re: Mesen Debugger - Feedback/Feature Requests? (2018 edition)

Ah, I probably broke the modulo operator back when I added support binary values (e.g "x == %00010001"). Might have to change the operator for one of them, but I'll try and see if it's simple to keep them both in with the '%' operator. Ah, I see. No worries about using a different operator if it ma...
by Bananmos
Sat May 09, 2020 10:04 am
Forum: NESdev
Topic: Mesen Debugger - Feedback/Feature Requests? (2018 edition)
Replies: 187
Views: 97192

Re: Mesen Debugger - Feedback/Feature Requests? (2018 edition)

So I'm trying to use the new super-useful assert feature with modulo to check my sprite page index is always divisible by 4, but can't get it to work. * Doing "assert(Y % 4 == 0)" just plain doesn't do anything. And when I try to type "%" in the debugger, it wont even accept the condition - so guess...
by Bananmos
Fri May 08, 2020 5:04 pm
Forum: NESdev
Topic: Aren't you afraid that NES Maker would just bring lazy noobs
Replies: 137
Views: 35310

Re: Aren't you afraid that NES Maker would just bring lazy noobs

And here are a few more hints: https://shiru.untergrund.net/articles/programming_nes_games_in_c.htm As much as I respect Shiru's work (all done in C, I know) the "time saving" example looks like total nonsense to me. No one in their right mind would "hand-write" assembly code like that. To begin wi...
by Bananmos
Tue May 05, 2020 11:21 am
Forum: NES Graphics
Topic: Poll: How would you prefer a first-person shooter on the NES to look like?
Replies: 19
Views: 2592

Re: Poll: How would you prefer a first-person shooter on the NES to look like?

Great to hear you're working on the raycaster again! I think it was such a cool project and would love to back a Kickstarter for the first fun'n'playable NES FPS. :) I think in cases like these, faking stuff is always better than brute-forcing it. Two tricks I can think of: 1) The Gamehut guy posted...
by Bananmos
Mon May 04, 2020 5:52 am
Forum: NESdev
Topic: Mesen Debugger - Feedback/Feature Requests? (2018 edition)
Replies: 187
Views: 97192

Re: Mesen Debugger - Feedback/Feature Requests? (2018 edition)

Is the .dbg file called "myrom.dbg" (not the lack of .nes in the name here) for a rom called "myrom.nes"? Is it in the same folder as the "myrom.nes" file? Doh! It was named myrom.nes.dbg... I've updated my built batch script and it seems to work fine now :) Glad it's already useful to someone! Lik...
by Bananmos
Mon May 04, 2020 3:16 am
Forum: NESdev
Topic: Aren't you afraid that NES Maker would just bring lazy noobs
Replies: 137
Views: 35310

Re: Aren't you afraid that NES Maker would just bring lazy noobs

I think that's the core issue I have with C on the 6502. The language is designed to assume a 16-bit CPU with local stack storage. To get anywhere near good performance, it appears you have to use generally poor practices (globals, excessive use of typecasts to avoid implicit int-conversion etc). An...
by Bananmos
Sun May 03, 2020 7:19 am
Forum: NESdev
Topic: Mesen Debugger - Feedback/Feature Requests? (2018 edition)
Replies: 187
Views: 97192

Re: Mesen Debugger - Feedback/Feature Requests? (2018 edition)

Was already planning on eventually doing something like this for the CHR viewer (to allow it to display PRG ROM as tiles), makes sense to have something similar for the sprite viewer, too. So, here you go! (next appveyor build will have it) Thanks a lot! Just used this new feature to easily track d...
by Bananmos
Sun May 03, 2020 5:15 am
Forum: NESdev
Topic: Aren't you afraid that NES Maker would just bring lazy noobs
Replies: 137
Views: 35310

Re: Aren't you afraid that NES Maker would just bring lazy noobs

I don't think performance is the key issue here. As you try to scale up a one-screen minigame to something larger on the NES, you inevitably run into more problems of asset management, tackling issues of having to choose compression formats for levels, how to carefully partition your banks, etc. Wit...