
I don't know any other 2D footy game that features streakers!
Loads more info at http://addictivefootball.blogspot.com/



Progress. Interestingly, finishing Step 4 took about 10 weeks actual, but due to getting massively fucked-off with the first two microcode designs - neither of which satisfied my twin objectives of functionality and elegance - I shelved it. Then two weeks ago I woke up with The Concept in my head, and now I have a fully-complete microcoded 6502 instruction set (including all the undocumented opcodes). Ergo, work now starts on Step 5 - which begins with a cycle-perfect 6502 emulator using my new microcode parser. Early code sample:Istar wrote:Step five, currently pending for this year, is to write the 6502 macro assembler/disassembler itself as a command-line executable in C#. An important point to note here is that this will inherently double as an emulator.
Code: Select all
// CPU Core
class CPU6502 {
short Accumulator; // We hold these as 16-bit shorts even though the hardware is 8-bits so that we can do 'rollover' on them.
short XRegister; // E.g. if A=255 and we add 1, we want A=0, not A=256. Holding them internally as short but having the property
short YRegister; // as byte means we can't do A=256 (which is illegal), but we -can- do A=255 / A++ and have A rollover to zero.
short StackPointer;// Equally, A=0 / A-- rolls 'under' to A=255.
short StatusWord;
int ProgramCounter;// PC does the same but at the next unit up - it is a 16-bit hardware register which we hold as 32-bits.
// Accumulator
public byte A {
get { return (byte)Accumulator; }
set { Accumulator = value; }
}
// X-Register
public byte X {
get { return (byte)XRegister; }
set { XRegister = value; }
}Istar wrote:Code: Select all
// CPU Core class CPU6502 { short Accumulator; // We hold these as 16-bit shorts even though the hardware is 8-bits so that we can do 'rollover' on them. short XRegister; // E.g. if A=255 and we add 1, we want A=0, not A=256. Holding them internally as short but having the property short YRegister; // as byte means we can't do A=256 (which is illegal), but we -can- do A=255 / A++ and have A rollover to zero. short StackPointer;// Equally, A=0 / A-- rolls 'under' to A=255. short StatusWord; int ProgramCounter;// PC does the same but at the next unit up - it is a 16-bit hardware register which we hold as 32-bits. // Accumulator public byte A { get { return (byte)Accumulator; } set { Accumulator = value; } } // X-Register public byte X { get { return (byte)XRegister; } set { XRegister = value; } }
Code: Select all
char Accumulator = 255;
Accumulator ++; // Accumulator now equals 0
Accumulator --; // Accumulator now equals 255
Nope, C# won't let you assign numerics to 'char' types.craigt wrote:Could you expand a bit on your comments on the registers? Surely if you store your Accumulator as a byte it will handle the rollover case without any problems.... E.g.
Code: Select all
char Accumulator = 255; Accumulator ++; // Accumulator now equals 0 Accumulator --; // Accumulator now equals 255
Code: Select all
byte Accumulator;


That look lovely. Looking forward to the demo. Lots of big heavy swingy things, please. Love the bit in the vid where the swing ball just clips the head of one of the people - you can almost hear him go "ow!".STEVIE G wrote:I'm playing around with my 2d physics engine atm,
A low res screenie for anyone interested. I'll have a demo out in a few weeks. A movie of it in action ...