Search found 650 matches

by Joe
Mon Jun 29, 2015 5:37 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

Hello? :( Does anyone know how to enable sprites? Start a DMA operation to copy the sprites from sprite RAM to the graphics chip's internal sprite buffer. The relevant code starts at line 64 in this file . Since it's a write16 function, the offsets are in words, not bytes. (You'll also need the add...
by Joe
Sat Jun 27, 2015 3:48 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

section code start=0x000C0 vstart=0 align=16 You don't have to specify start for that section; yasm will put it after the previous section automatically. I guess there should be a register that you write to for a general vblank? Possibly. I took a quick look at it but didn't see any way to disable ...
by Joe
Fri Jun 26, 2015 11:25 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

Interestingly, the V33A's datasheet says that interrupts 8 through 15 are explicitly reserved, but ... apparently that didn't stop Irem! They're reserved for use on other x86 CPUs, which means it's perfectly safe to use them if you aren't planning on running the same software on a different CPU. (T...
by Joe
Fri Jun 26, 2015 1:01 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

What? You mean I need to set up a vblank thing? Just like with the NES and SNES, there is a vblank interrupt and you probably need to use it for something. There are other interrupts as well, but vblank is probably the first one you'll want to set up. In order to use interrupts, you need to at set ...
by Joe
Thu Jun 25, 2015 1:38 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

Your sections are still in the wrong order. The "data" section needs to be before the "reset" section or it won't work. It looks like you're trying to set DS, but you don't know what to set it to. mov word AX, 0x0000 mov word DX, AX Since you're trying to access variables inside ...
by Joe
Thu Jun 25, 2015 11:36 am
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

The very first instruction after the reset vector shows one problem: mov word [XDirection], 0x0001 All memory accesses are relative to a segment register. In this case, you are writing to memory relative to DS. You never set DS, so who knows what you're actually writing. Speaking of segments, your s...
by Joe
Wed Jun 24, 2015 12:58 am
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

"thread locker" That's certainly what will happen if we continue our digression into parallels between Spanish and x86 assembly. (Besides, that's not even how you use that instruction: the second operand can only be memory, not an immediate.) Anyway, when trying to figure out why the asse...
by Joe
Mon Jun 22, 2015 9:41 am
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

The ES prefix causes the source address to be ES:SI instead of DS:SI, which means I can skip setting DS. But it isn't useful if one of the addresses isn't 0? If the source and destination are both in the same segment, DS contains the wrong value, and I don't want or need to set DS, then I'll just s...
by Joe
Mon Jun 22, 2015 12:18 am
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

Is MOVSW any quicker than MOVSB? Usually. It depends on the CPU. Why not just move 0 into SI? Using XOR or SUB produces code that is smaller and, on many CPUs, faster. In this case, it's a matter of personal preference: the differences in size and speed are usually not impressive, and I didn't need...
by Joe
Sun Jun 21, 2015 12:22 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

So you're telling me REP modifies the CX register, and CX is how many bytes it will copy? That is correct. Set CX to the number of bytes you want to copy, and REP MOVSB will copy that many bytes. At the end of the copy operation, CX will be 0. You shouldn't mess with SI or DI, should you, because t...
by Joe
Sun Jun 21, 2015 8:30 am
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

I still don't understand what "REP MOVSB" does. It copies the values of the addresses from DS to ES, and then how do you say where it is supposed to store it at? Is rep's operand the address? REP is a prefix. It modifies the behavior of the following string move instruction: it will be ex...
by Joe
Sat Jun 20, 2015 11:40 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

I just wanted to have it to where I wanted to call certain hardware registers by names, so I could say "SpriteRam" instead of "$XXXX". SpriteRam equ 0xXXXX is there a way to make it to where the resb thing won't even overwrite a hardware register? You can divide things up using ...
by Joe
Sat Jun 20, 2015 1:51 pm
Forum: General Stuff
Topic: Simple x86 Code: Does This Look Good?
Replies: 135
Views: 26726

Re: Simple x86 Code: Does This Look Good?

Here, check out the manual. In particular, look at the sections on resb and equ.
by Joe
Wed Jun 10, 2015 12:20 pm
Forum: Reproduction
Topic: Does nes donor board actually matter? Is it just the chips.
Replies: 8
Views: 5586

Re: Does nes donor board actually matter? Is it just the chi

However A board that houses a mmc3c as compared to a board that is mmc3b would be identical correct? No. Just as an example, a game designed to run on a board like TQROM, TR1ROM, TKROM, or TLSROM won't work properly on TLROM. Just having a MMC3 isn't enough. TQROM has additional logic to use both C...
by Joe
Sat Jun 06, 2015 1:44 pm
Forum: Reproduction
Topic: Issue making TMNT 1 MMC3 Reproduction
Replies: 11
Views: 6833

Re: Issue making TMNT 1 MMC3 Reproduction

AaronE wrote:I'm using a TLROM board.
Are you sure? The board in your picture says TLSROM, which is not compatible with the "standard" MMC3 configuration.