Search found 170 matches

by slembcke
Tue Aug 20, 2019 12:40 pm
Forum: NESdev
Topic: 8bitworkshop - online IDE now supports NES
Replies: 19
Views: 12002

Re: 8bitworkshop - online IDE now supports NES

Wow! I saw this come up in my Twitter or RSS feeds a few days ago and bookmarked it. This is really quite impressive though. Not that it would replace my local setup, but maybe I can get some more local gamedevs interested in retro-dev. :D
by slembcke
Wed Aug 14, 2019 11:31 am
Forum: Newbie Help Center
Topic: Do you/does it make sense to imitate function calls?
Replies: 18
Views: 6544

Re: Do you/does it make sense to imitate function calls?

It was kind of touched on by some people, but even cc65 doesn't strictly use the standard C calling convention by default where everything needs to be pushed onto the stack. Normally it uses fastcall. The last argument is placed in the A register (or AX for 16 bit values), and return value is also p...
by slembcke
Sat Jun 22, 2019 7:34 am
Forum: NESemdev
Topic: Catalina Wine Killer. Is 64-bit FCEUX for Windows possible?
Replies: 18
Views: 18022

Re: Catalina Wine Killer. Is 64-bit FCEUX for Windows possib

I did specifically say pragmatism eventually winning out over cost and principle. ;) I do get it though, especially the principle part. Despite owning several copies of Windows, I rarely use it because I simply don't like to. and have the X server in the outer OS display the result Interesting, I di...
by slembcke
Fri Jun 21, 2019 10:01 pm
Forum: NESemdev
Topic: Catalina Wine Killer. Is 64-bit FCEUX for Windows possible?
Replies: 18
Views: 18022

Re: Catalina Wine Killer. Is 64-bit FCEUX for Windows possib

The official workaround appears to be to install Ubuntu 18.04 LTS in an LXD container and run wine32 in that. Yeah... I saw that... If you are going to run something in a VM to run Windows software I'm not sure why you wouldn't just run Windows. Pragmatism really has to win out over principle or ev...
by slembcke
Fri Jun 21, 2019 9:12 am
Forum: NESemdev
Topic: Catalina Wine Killer. Is 64-bit FCEUX for Windows possible?
Replies: 18
Views: 18022

Re: Catalina Wine Killer. Is 64-bit FCEUX for Windows possib

Huh, apparently not just an OS X problem. https://www.linuxuprising.com/2019/06/wine-developers-concerned-with-ubuntu.html tl;dr The next major version of Ubuntu is dropping 32 bit packages as well, and the Wine devs are Concerned. Huh... I really didn't think Wine used 32 bit libraries on a 64 bit ...
by slembcke
Fri Jun 21, 2019 8:18 am
Forum: NESdev
Topic: cc65: Array access with int index even if it should be abyte
Replies: 27
Views: 12912

Re: cc65: Array access with int index even if it should be a

I've skimmed some of the cc65 optimizer code, and there's really not that much to it. It simply doesn't recognize many cases where it can optimize, and those are the only places where it really seems to relax the spec. I'm not going to tell you "just write it all in assembly", because I don't. I jus...
by slembcke
Wed Jun 19, 2019 8:05 am
Forum: NESdev
Topic: cc65: Array access with int index even if it should be abyte
Replies: 27
Views: 12912

Re: cc65: Array access with int index even if it should be a

calima wrote:Is xor a valid alias to eor?
Uh... probably not. That's just the sort of shoddy off the top of my head examples I'm known for. LOL
by slembcke
Tue Jun 18, 2019 10:03 am
Forum: NESdev
Topic: cc65: Array access with int index even if it should be abyte
Replies: 27
Views: 12912

Re: cc65: Array access with int index even if it should be a

Related tip: you can use the pseudo variables __A__ and __AX__ to make shuffling data in and out of inline assembly much easier. Quite handy when you pair it with (abuse?) the comma operator. Dumb example: #define DUMB_MACRO(value) (__A__ = value, asm("xor #$0F"), __A__) my_variable = DUMB_MACRO(45)...
by slembcke
Mon Jun 17, 2019 8:22 am
Forum: Homebrew Projects
Topic: NESmaker, the love and the hate...
Replies: 8
Views: 7030

Re: NESmaker, the love and the hate...

I watched the intro bit with all of the games, and they look really good! Sorta skimmed the rest of the video though. There are a lot of impressive achievements in those games.
by slembcke
Mon Jun 17, 2019 8:09 am
Forum: NESdev
Topic: cc65: Array access with int index even if it should be abyte
Replies: 27
Views: 12912

Re: cc65: Array access with int index even if it should be a

For the OPs question, I've never found a particularly better way to do it either. I have a global zero page variable 'idx' that I use exclusively as a temporary value for indexes. You can use it with the comma operator to make it a little less obtuse, if a little more obscure. I like doing it this w...
by slembcke
Thu Jun 13, 2019 1:59 pm
Forum: SNESdev
Topic: Collision Detection between 128 Objects?
Replies: 27
Views: 13083

Re: Collision Detection between 128 Objects?

Sounds kinda similar to what I do in Chipmunk's spatial hash implementation. I timestamp the cells, and if the timestep doesn't match when inserting or querying against a cell, then the list is old and added back to the pool.
by slembcke
Wed Jun 12, 2019 9:57 am
Forum: Other Retro Dev
Topic: Designing a cooperative-threaded scheduler for an emulator
Replies: 3
Views: 4887

Re: Designing a cooperative-threaded scheduler for an emulat

Hmm, yeah. I was going to say maybe a min-heap, but if you only have a small number of chips a linear search might be faster anyway? It almost sounds like you are describing transactional memory, but need a lite version of it. If you aren't familiar, it's a way to do lockless threading whereby each ...
by slembcke
Wed Jun 12, 2019 9:36 am
Forum: NESemdev
Topic: Catalina Wine Killer. Is 64-bit FCEUX for Windows possible?
Replies: 18
Views: 18022

Re: Catalina Wine Killer. Is 64-bit FCEUX for Windows possib

Hmm. Is there really reason to believe 32 bit Wine will stop running as long as Wine itself is 64 bit? AFAIK, OS X isn't somehow preventing 32 bit instructions from running, they are just removing the 32 bit system libraries that native 32 bit code relies on. Wine itself is a regular 64 bit executab...
by slembcke
Wed Jun 12, 2019 8:53 am
Forum: SNESdev
Topic: Collision Detection between 128 Objects?
Replies: 27
Views: 13083

Re: Collision Detection between 128 Objects?

I used to write physics engines for a living, and this can be a fairly endlessly difficult problem if you want a super-duper-generic-and-scalable solution. The most important step you can do first is to split your data into separate types that don't collide. (ex: moving/non-moving, player/enemy) I'v...
by slembcke
Sat Jun 08, 2019 9:41 pm
Forum: NESemdev
Topic: New cross-platform emulator being released soon. RustyNES!!
Replies: 2
Views: 5373

Re: New cross-platform emulator being released soon. RustyNE

Nice. My homebrew games seem to run fine on it. Seems to not ignore key repeat though? (At least on Linux, haven't tried it on Mac yet). Have you tried deploying it as a WASM build since that's pretty easy with Rust? Might be a nice alternative to JSNES.