|
|
Search
|
|||||||
| Home | Register | Downloads | FAQ | Members List | Calendar | Arcade | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#121 (permalink) |
|
ライチュウ
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: USA
Posts: 3,289
|
I wrote a Chip8 disassembler in C#. You need .NET 2.0 or higher to use it. Please bug test for me[check for crashes, and if you know the chip8 assembly language, please check if I missed any opcodes]. It supports C8 and SC48 games. ![]() Known bugs: -Alignment bug due to how silly the alignment is in most C8 games. Can't really be fixed. Source available at http://code.google.com/p/chip8-emu/source/list under the OmegaDax branch.
__________________
Last edited by Dax; April 9th, 2009 at 03:53.. |
|
|
|
| Advertisement | [Remove Advertisement] | ||
|
|
|
|
#122 (permalink) |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,842
|
Alright, I think I got everything working now. Dax , there was indeed a stupid error with my BCD implementation XD Also tweaked my draw method and now everything shows up correctly in Space Invaders (and all other games for that matter) Only thing left is that it's too fast but I couldn't care less right now about that. So what now....? Restart my NES emu... or start a GB emu?
|
|
|
|
|
|
#124 (permalink) |
|
Registered User
Join Date: Mar 2009
Location: United States
Posts: 9
|
Quick question. Do you guys know if the two SCHIP functions 'Shift Screen Left 4 Pixels' and 'Shift Screen Right 4 Pixels' are supposed to wrap the pixels that are cut off to the opposite side, or are they just supposed to be discarded? Also, the same question goes to the scroll down function.
|
|
|
|
|
|
#126 (permalink) |
|
ライチュウ
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: USA
Posts: 3,289
|
I've been porting my emu to C# for the past few days. It's been really easy so far: I literally copy pasted my C++ CPU core into the project and added the needed type casts to bytes, ushorts, etc. It all seems to work decently too, except I'm struggling to rewrite the DirectX code since I'm not very experienced with D3D. Most of the games I've tested seem to show at least SOMETHING, which is good. The only game with perfect graphics is Pong, and perhaps Blitz, on the title screen.
__________________
|
|
|
|
|
|
#128 (permalink) |
|
ライチュウ
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: USA
Posts: 3,289
|
The games draw way too high on the screen, including under the menu bar, that and it doesn't always draw everything on the screen. I borrowed code from Hatori again, so I'm still learning DirectX. I just wish I knew more DirectX, to figure out what the hell the deal is. ![]() This is my video code if anyone cares: http://code.google.com/p/chip8-emu/s...pec=svn33&r=33 It's really buggy and far from perfect at the moment. For instance, if I make the backbuffer size any bigger than native resolution, it never draws anything. ![]() Also, I added my C# code as yet another branch to the emu. http://code.google.com/p/chip8-emu/source/browse/
__________________
|
|
|
|
|
|
#129 (permalink) |
|
ライチュウ
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: USA
Posts: 3,289
|
Well I'm extremely discouraged, almost to the point of quitting. For some reason, when i try to debug my CPU, I can't step through the code correctly anymore, almost as if the debugger has become bugged. Anyone who knows C#, could you please look at my CPU code? I really don't want to have to rewrite this core a 6th time, or however many rewrites I've done now..
__________________
|
|
|
|
|
|
#130 (permalink) | |
|
Registered User
![]() ![]() ![]() ![]() Join Date: Jul 2006
Location: you know...
Posts: 506
|
Quote:
__________________
The Empyrean |
|
|
|
|
|
|
#131 (permalink) |
|
Emu Author
![]() ![]() ![]() Join Date: Dec 2004
Location: North Carolina
Posts: 374
|
the major issue is that debugging in his emulator is getting messed up somewhere and i am not even sure where its happening and i have never seen a problem like it since i started working on c# as the c# debugger is usually very good. even moving the core into a new project, allows it to work for a time before it goes right back to the same problem. and its not specific to 1 os either. when debugging, it never follows the execution path you'd expect it to, it jumps sparatically instead of going in a straight line. also, the program counter increments when it should not as well. |
|
|
|
|
|
#133 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,380
|
Quote:
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 |
|
|
|
|
|
|
#135 (permalink) |
|
Emu Author
![]() ![]() ![]() Join Date: Dec 2004
Location: North Carolina
Posts: 374
|
whats wrong with the debugger is listed in my last post, and was unable to figure out why its doing what it is, i have been going over his code to figure out the issue and still unsure whats going on.
|
|
|
|
|
|
#136 (permalink) | |
|
ライチュウ
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: USA
Posts: 3,289
|
Quote:
__________________
|
|
|
|
|
|
|
#137 (permalink) | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,380
|
Quote:
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 |
|
|
|
|
|
|
#138 (permalink) |
|
ライチュウ
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: USA
Posts: 3,289
|
Well @ru and I figured out[more so him than I, but still ] that I had a bit of bad logic in my timer handler, so that was what caused the debugger to go crazy. We put in a while loop in the timer that just executes opcodes, and boom, problem solved. Also, he informed me that nested switches were a no-no, so those were removed as well. Now I just need to add input and fix up the GUI!
__________________
|
|
|
|
|
|
#139 (permalink) |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,380
|
Actually the C# debugger was doing a great job there because the Timer was calling the "cpu.Execute" method each time even if you were inside of the method(break point) so the debugger tried to show you every single process step created by the Timer class.. making you think the code was jumping like crazy and at the end creating problems in your app... in fact the debugger was doing a damn great job lol.. nested switches are ok but it depends how you use it.. in your case some simple ifs were better and make the code a bit more readable i think. eitherway your problem is fixed now and you can go further
__________________
Current development tools: Visual C++.net, Visual C#.net Visual VB.net, Visual Webdeveloper.net Bloodshed Dev C++, Borland C++ Visual Basic 6 |
|
|
|
|
|
#140 (permalink) |
|
ライチュウ
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: USA
Posts: 3,289
|
Now I just need to do input[not looking forward to this since my last input implementation was terrible], make a new GUI for the whole thing, and fix a few CPU bugs to fix games like Space Invaders.
__________________
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|