I'm having problems with my Schip8 "emulator".
The
Chip8 games runs fine and
runs schip8 games too but in the schip the "screen" is presented with some strange cuts ... look the "pac man" and "ant" (the ant game doesn't show the "land" too...)

The dragon2 seems to have some issues too...
Then I thought this could be a
Scroll error stuff and I made this test (below) but the results seems to be correct.
Code:
Processor cpu = new Processor();
int initialAddress = 0x200;
Engine videoMock =new Engine(cpu);
Emulator.setVideo(videoMock);
Emulator.init();
cpu.dataRegister.V[1] = 0x0; //x
cpu.dataRegister.V[2] = 0x0; //y
cpu.addressRegisterI = 0x20A; //initial sprit 16x16
cpu.getMemory().writeAt(initialAddress++, (short)0x00); //setting schip mode
cpu.getMemory().writeAt(initialAddress++, (short)0xFF);
cpu.getMemory().writeAt(initialAddress++, (short)0xD1); //draw 1 2 16x16 from 0x20A
cpu.getMemory().writeAt(initialAddress++, (short)0x20);
cpu.getMemory().writeAt(initialAddress++, (short)0x00); //scroll down 1
cpu.getMemory().writeAt(initialAddress++, (short)0xC1);
cpu.getMemory().writeAt(initialAddress++, (short)0x00); //scroll 4 to rigth
cpu.getMemory().writeAt(initialAddress++, (short)0xFB);
cpu.getMemory().writeAt(initialAddress++, (short)0x00); //scroll 4 to left
cpu.getMemory().writeAt(initialAddress++, (short)0xFC);
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.getMemory().writeAt(initialAddress++, (short)0x80); //10000000
cpu.getMemory().writeAt(initialAddress++, (short)0xFF); //11111111
cpu.step(); //set high
cpu.step(); //false draw, just put the 1s and 0s on matrix
print(videoMock.getFrame()); // take a snapshot, 1
cpu.step(); //scroll down 1
print(videoMock.getFrame()); // take a snapshot, 2
cpu.step(); //scroll 4 or 2 for rigth
print(videoMock.getFrame()); // take a snapshot, 3
cpu.step(); //scroll 4 or 2 for left
print(videoMock.getFrame()); // take a snapshot, 4
Snapshot 1 (just draw)
======================================== =======================================
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
1|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0| 0|0|0|0|0|0|0|0|0|0|0|0|0|
0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0| 0|0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x=132,y=31
[VideoEngine] ERROR: Pixel[1] --> it couldn't be happen' x=132,y=32
[VideoEngine] ERROR: Pixel[1] --> it couldn't be happen' x=132,y=30
....
So I think it can be a error of my part make the boundary over 131 (0-132).
You guys mark pixel on this coordinate?
Best regards,
Last edited by dreampeppers99; January 8th, 2009 at 20:30..
Reason: additional information