Search found 173 matches

by ReaperSMS
Fri Dec 06, 2019 10:00 am
Forum: NESemdev
Topic: Suggestions to follow branch instructions
Replies: 23
Views: 3392

Re: Suggestions to follow branch instructions

Short answers: Yes, yes, and yes. Technically you count from either RESET or power on, and there's the question of counting CPU clocks, master clocks, or PPU dots, but where you come down on that depends on how accurate you are trying to be. More or less every game is going to start with two of thos...
by ReaperSMS
Fri Jul 12, 2019 4:44 pm
Forum: General Stuff
Topic: Connecting to X Server... In assembly.
Replies: 14
Views: 4678

Re: Connecting to X Server... In assembly.

Does Linux have an equivalent to the divide between kernel32 and msvcrt? That divide sort of exists in glibc, in that the kernel32 type bits would be in unistd.h, and various sys/*.h files, with the usual libc bits in stdio and friends. It usually exposes a direct syscall() macro/inline function fo...
by ReaperSMS
Fri Jul 12, 2019 1:10 pm
Forum: General Stuff
Topic: Connecting to X Server... In assembly.
Replies: 14
Views: 4678

Re: Connecting to X Server... In assembly.

File IO and stdlib stuff has been covered already Oh, okay, I guess I have missed the point. I was thinking about asm & network & os calls & GUI functions as separate issues (and especially missed the part about network being needed to access GUI functions ). If I got it right now: Linux kernel does...
by ReaperSMS
Fri Jun 14, 2019 9:09 am
Forum: SNESdev
Topic: Maybe floating point isn't that bad of an idea.
Replies: 15
Views: 7499

Re: Maybe floating point isn't that bad of an idea.

There are a few other complications involved. Addition is nowhere near as simple, as you need to align the exponents first. The barrel shifting for that will not be quick in '816. Catching and handling exponent overflow and underflow do need to be done. Usually you want to have zero be special cased...
by ReaperSMS
Wed Jun 05, 2019 11:30 am
Forum: Newbie Help Center
Topic: Note Duration Values A Bit Odd
Replies: 9
Views: 5342

Re: Note Duration Values A Bit Odd

That's fairly typical, most engines seem to handle note length, and volume enveloping manually. Several will do frequency sweeps manually as well. Does it actually pack 4 bytes per note, every note? Almost every engine I've looked at has gone with a channel structure along the lines of: byte >= 0x80...
by ReaperSMS
Tue Jun 04, 2019 4:17 pm
Forum: Newbie Help Center
Topic: Note Duration Values A Bit Odd
Replies: 9
Views: 5342

Re: Note Duration Values A Bit Odd

Are you sure the length byte translates directly into a register setting? The engines I've looked at usually bounce it through another table, as the music engine will need to get a length in frames as well to know how to move through the tune, and to handle rests. That said, most of the ones I recal...
by ReaperSMS
Fri May 10, 2019 3:30 pm
Forum: General Stuff
Topic: "Modern compilers will outperform handwritten assembly."
Replies: 19
Views: 11688

Re: "Modern compilers will outperform handwritten assembly."

Fair 'nuff. My experience is almost entirely on 486+ PC hardware, retro consoles, and PS2/GC-present consoles. I could certainly see the promise of a sufficiently smart compiler being closer to reality on the sort of machines people wrote FORTRAN code for. It definitely wasn't the case for most of t...
by ReaperSMS
Fri May 10, 2019 2:49 pm
Forum: General Stuff
Topic: "Modern compilers will outperform handwritten assembly."
Replies: 19
Views: 11688

Re: "Modern compilers will outperform handwritten assembly."

The idea post-dates most of the 32 bit era. The compilers started getting competitive with hand written stuff in the 486/pentium era, and have gotten better as the used subset of x86 shrinks down, and the chips become a bit more regular as far as timing goes. A hefty amount is due to the microarchit...
by ReaperSMS
Wed May 08, 2019 1:34 pm
Forum: NESemdev
Topic: Help to identify PPU timing issue
Replies: 11
Views: 10359

Re: Help to identify PPU timing issue

The fact that it looks like every tile is splatted down 3-4x at a 2 pixel offset from each other is probably relevant. If you are really trying for a cycle by cycle one, built around a set of shift registers, I'd suspect, in no particular order: Splatting new bytes into the 16 bit buffer wrong Corru...
by ReaperSMS
Fri Apr 05, 2019 12:54 pm
Forum: General Stuff
Topic: Annoyance with Allegro + key polling
Replies: 5
Views: 4326

Re: Annoyance with Allegro + key polling

That should probably look more like char kval = key[KEY_T]; if (kval) { value |= 0x40; if (0 == my_key) do_stuff(); } my_key = kval; What could be happening is that KEY_T gets released during do_stuff(). This is of course presuming you've called the setup code needed to get the timer and keyboard ru...
by ReaperSMS
Wed Mar 06, 2019 3:39 pm
Forum: General Stuff
Topic: Any modern systems with just have a CPU and a frame buffer?
Replies: 27
Views: 13128

Re: Any modern systems with just have a CPU and a frame buff

Minor pedantry to be technically correct: Mode-X is not linear. VGA at the time had a good 256KB of memory, but the window for it was only 64K (segment A000). I'm ignoring the text & monochrome areas at B000 and B800. It dealt with that via a plane selector. The 16 color EGA modes laid things out su...
by ReaperSMS
Thu Apr 19, 2018 3:15 pm
Forum: NESdev
Topic: How careful are you about code size?
Replies: 26
Views: 6889

Re: How careful are you about code size?

How much of The Legend of Zelda is code and how much is data? Quick rough calculation: Approximately 25% padding Approximately 40% code (estimated by histogram) Remaining 35% assumed to be data If Zelda is a 128kB game, wouldn't that be like 3 or 4 banks of code? That must be a bankswitching nightm...
by ReaperSMS
Wed Apr 18, 2018 2:36 pm
Forum: NESemdev
Topic: PPU Random Stripes of Color
Replies: 13
Views: 6052

Re: PPU Random Stripes of Color

I think I see what's happening. You should make your attribute shift registers 16 bits wide, to match the pattern registers, and update them in a similar fashion, by ORing a 00 or FF into the lower byte. Your current code is stomping your entire attribute shift register the moment the new tile gets ...
by ReaperSMS
Wed Apr 18, 2018 12:47 pm
Forum: NESemdev
Topic: PPU Random Stripes of Color
Replies: 13
Views: 6052

Re: PPU Random Stripes of Color

what does fetchData() look like? Does it have the proper checks to fetch the right bytes at the right times?

I suspect you are trampling the attribute data immediately, rather than letting it properly shift itself out.
by ReaperSMS
Wed Apr 18, 2018 10:27 am
Forum: NESemdev
Topic: PPU Random Stripes of Color
Replies: 13
Views: 6052

Re: PPU Random Stripes of Color

It does, but digging up memories of getting it working in an emulator suggests that when the palette mirroring is wrong, the sky turns black. Is there an if wrapping that "Reloading code" that restricts it to just after the actual reads? The one as written looks like it would be reloading the shift ...