Paging probably
secretcow or
korgmeister or I think maybe
caladri I don't know
sei ; interrupt disable
cld ; disable stupid stupid decimal mode
ldx #%01000000 ; a flag i'm about to stuff somewhere for my particular application
nop ; it doesn't matter what this is -- we always halt immediately after
; the last cycle of the ldx. Because the world hates me.
Why the hell does this halt right after the ldx on a 65C802? It works fine on a 6502 or a Ricoh 2A03. It always halts at the first ldx I try to do, unless I leave out the interrupt disable. However, if I do that, it jumps into damn nowhere a bit later, because there's no way for me to have the interrupt table set up yet (not without my registers!), and I get an unavoidable interrupt on a timer unless I disable them. Basically, it looks like the 65C802 won't let me ldanything when interrupts are off! What the hell! The documentation didn't warn me about this! Does anyone know what is going on here?
It is worth pointing out that X does indeed appear to contain what I loaded into it, but it doesn't matter, because the processor unceremoniously breaks immediately upon completion of this instruction. Weird. And the 'C802 is supposed to be a drop-in replacement for the stupid '02!
Also today I learned that 6502 programmers are the worst about premature optimization holy damn. (And they all think that inx inx is a faster way to get X from $FE to $00 than ldx #$00, which is hilarious)
i got more than two problems
no subject
Date: 2008-02-28 11:49 am (UTC)no subject
Date: 2008-02-28 11:58 am (UTC)ps the 88k is interesting because it's so damn weird and operates like something I designed when I was 8 years old but the 68k is actually a piece of trash and i hate it and i wind up using it all the time anyway
Remind me to tell the story about the time I tried to build a video game machine based on the 68k (it was actually basically a sega genesis/mega drive knockoff but don't tell anyone) and instead almost killed myself
Everyone should learn to use the stupid 6502 though. The fun way is to learn how to program the NES (6502 knockoff with no decimal mode) or the C64 (6510; actual differences minimal)
no subject
Date: 2008-02-28 12:01 pm (UTC)no subject
Date: 2008-02-28 12:10 pm (UTC)I messed around with the Game Boy a lot when I was like 14. I wrote one or two Game Boy Color games and a simple sound driver to play a compressed music format of my own design (I almost sold this code to some development studio under THQ, but it wound up not going through, though it looks to me like they used part of the damn code anyway). The hilarious thing is that I never actually had a dev cartridge setup, even though I always wanted one, because I was poor %D I wound up using emulators and being really careful to look for things in my code which would work on my emulator, but not on the real hardware.
Lately I have been playing around with the NES. I actually managed just tonight to discover a nifty graphics effect trick which I don't think anyone actually ever used in a commercial game. Hilarious.
When I used the 68k, it was usually to write stuff for the pre-ARM Palms, and I did so grudgingly. One of these days, though, I want to hack out a music program and MIDI interface for the 68k-based Sega Genesis. That thing has a damn DX7 in it.
no subject
Date: 2008-02-28 12:22 pm (UTC)no subject
Date: 2008-02-28 12:48 pm (UTC)Have you guys worked with the 6502 at all or are you only using actual up-to-date hardware like AVRs or whatever
no subject
Date: 2008-02-28 03:24 pm (UTC)no subject
Date: 2008-03-04 09:41 am (UTC)LOL COMPUTERS
Date: 2008-02-29 02:25 pm (UTC)I mainly work with the 68HC11, so i'm not TOOOO familiar with the 65C802 but i'll take a look around at the sources I have lying around (books lol)
Re: LOL COMPUTERS
Date: 2008-03-04 09:43 am (UTC)I have exactly one 65C802 here so it's possible that both it and the DOS sim are broken I guess?!?!?!? but I can't think of how a real 65C802 could go south in that manner