Need help with Chip8 emu.

Discussion in 'Web development / Programming' started by Crckr hckr, Apr 27, 2012.

  1. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Well after a bit of encouragement, I managed to start coding a chip 8 emu. Can someone help me debug this code. I don't see anything on the console window. Normally there is Illegal opcode:XXXX Help me. Also can someone help me with how I can do graphics?
  2. NGEmu.com Advertisement

  3. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Fixed a lot of code.

    See attachment
  4. runawayprisoner

    runawayprisoner Level 9998

    Messages:
    9,384
    Likes Received:
    0
    Well, what are you expecting to see in the console window? I don't see you output anything but errors and a "BEEP!" notification.

    If there is nothing wrong with the code, then it shouldn't throw any of those errors around.

    As for graphics, what platform are you working on specifically? The current codes are very generic.
  5. KrossX

    KrossX クロスエックス

    Messages:
    4,201
    Likes Received:
    27
  6. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Graphics

    Well, I am on windows and using codeblocks. Can someone tell me how I can create a text based graphics output to the console. So it would then output a * for 1. How do I output my graphics array and output it?
  7. runawayprisoner

    runawayprisoner Level 9998

    Messages:
    9,384
    Likes Received:
    0
    Well, if you output text as graphics for Chip-8, trust me, it'll be very messy... and annoying to deal with.

    For one, you'll need exactly 64 x 32 rows on the screen.

    But if you are fixated on that, some printf functions will do. Or alternatively, you can also use C++ with cout, which has nicer readability.
  8. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    See my code, Is my code right? Give me some better code for cout or printf().
  9. KrossX

    KrossX クロスエックス

    Messages:
    4,201
    Likes Received:
    27
    "Give me some better code" ? Code something yourself first. Since if you cannot do text output to a console...
  10. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Ow, I know that. But my problem is how can I instead of 1s and 0s use * and blank spaces. Also can I update the screen, without it scrolling down. It's just not right~}!
  11. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Update

    Well, hell yeah. I now have a working CPU core. Some screenshots attached and
    source code as well.
  12. Shendo

    Shendo R3000 Moderator

    Messages:
    5,058
    Likes Received:
    25
    Cool , nice going :thumb:
    Btw, any reason for switching between Win 7 and XP?
  13. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Thanks and Well yeah, taking into consideration I am still a 14 year old...
    I have a laptop with 7 and a desktop with xp, my laptop screen gives me headaches.
  14. Bill_gates

    Bill_gates Linux's worst nightmare..

    Messages:
    1,510
    Likes Received:
    0
    glad you managed to figure things out!
  15. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Any good and easy SDL tutorials? :heh:
  16. Purkinje

    Purkinje Squire

    Messages:
    105
    Likes Received:
    0
  17. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0
    Well, I did the graphics and input, Thanks anyway.
  18. Crckr hckr

    Crckr hckr New Member

    Messages:
    13
    Likes Received:
    0

Share This Page