Make "1987.elf" work.
Posted on 2005-09-10 00:00:00
Nothing special today. Added opcodes ADD.S, SUB.S, MUL.S, DIV.S, CVT.W.S, LWC1, SWC1, MFC1.

Some stuff were bugging me though while adding those.

MFC1 sign extends the value stored to the GPR to the lenght of the register... Yet, the lenght of the GPRs are known by main CPU module only. I'd probably need to move that concept into the base instruction factory class.

For LWC1 and SWC1, I don't think there would be a need to rewrite the function for calculating the memory access address in the COP1 module like I did right now... Maybe I should put this in the base class too.

For CVT.W.S, the rounding mode has to be known to make this instruction work correctly. But this demo doesn't change the rounding mode at all (this is controlled by the FCSR). We'll just assume that it doesn't really care about it for now, but that will need to be taken in consideration later.

I also added the line primitive and the demo starts to show some stuff.


Screenshot #000016


Those lines are supposed to make up the 1987 logo at the beginning of this demo. It's kinda hard to explain how it's supposed to work and there's a bug with the logo actually not showing to make things worse...


Screenshot #000017


This is the star field that appears later on and I think there's some text supposed to appear, but it doesn't work either apparently.

Between those 2 screens, there's another effect that's supposed to show, but due to missing opcodes in the CPU core, all we see it a black screen.

I'll be working on that after I clear up the points that's been bugging me. And I'd also need to implement the logging filter thing too because it's slowing down the thing a lot in debug mode.