Page 104 of 106 FirstFirst ... 45494102103104105106 LastLast
Results 1,031 to 1,040 of 1057

Thread: Chip 8

  1. #1031
    EmuTalk Member
    Join Date
    Aug 2016
    Posts
    25
    Mentioned
    0 Post(s)
    Cool Idea Cyan. Sadly my current schedule doesn't allow me to participate.

    A little update on my project:

    After a couple rides on the morning train, i've finally implemented some touch buttons, and a rudimentary register debugger. Now my question is... How should i go about advancing one step at a time. Most of my cases control the flow of the program with Pc+=2 or 4 and I can't really figure a way of advancing only one instruction at a given time.

    So far I've tried Hi-jacking the opcode fetching instruction and linking it to a boolean activation of one of my on screen buttons, but that doesn't seem to cut it...
    Sorry, but that's as far as I have went... Morning rides are a bit on the short side and i don't have much time to code (I exclusively code on my phone using C4droid)



    So that's that... Behold Chip4droid running on an overkill One plus 3 phone haha


    Edit** HOHO figured it out I isolated the whole opcode fetcher + decoder method behind an if state to check for a boolean variable controlled by the touch of the button
    //Editing in case anyone ever (unlikely) finds himself in the same spot
    Last edited by ]-[ D X; September 4th, 2016 at 03:43. Reason: Solving + documenting

  2. #1032
    EmuTalk Member
    Join Date
    Jun 2017
    Posts
    10
    Mentioned
    0 Post(s)
    Hi everyone.

    I'm trying to make a chip8 emulator with processing, my first goal is to run MAZE since it's the most simple rom that I found.

    Unfortunetly, I'm stuck with this result.



    As you can see, I get to draw the two sprite well but one of them is draw much more frequently.

    As much as I checked my code, I couldn't find what I did wrong.

    Your help will be appreciated.

    Here's my code : https://github.com/Okarin85/Chip8-Pr...hip8/Chip8.pde

  3. #1033
    EmuTalk Member
    Join Date
    Aug 2016
    Posts
    25
    Mentioned
    0 Post(s)
    thats a pretty simple maze if you ask me haha. i'll take a look

    - - - Updated - - -

    look at your 0x3000 case
    if the condition is met it should skip the next instruction so... pc+=4
    this should be changed anywhere it directs you to skip
    good luck =)
    Last edited by ]-[ D X; June 8th, 2017 at 21:24.

  4. #1034
    EmuTalk Member
    Join Date
    Jun 2017
    Posts
    10
    Mentioned
    0 Post(s)
    Thank you for your quick reply ]-[ D X

    At the end of my switch, I have another pc+=2.

    So if the condition is met, it already increase the pc by 4.

    I tried your solution anyway and got this result.

    Last edited by Okabe; June 8th, 2017 at 22:03.

  5. #1035
    EmuTalk Member
    Join Date
    Aug 2016
    Posts
    25
    Mentioned
    0 Post(s)
    Sorry didnt see your other +2 one thing that has been bothering me is your implementation of 0x7000
    case 0x7000:
    V[x] = char((V[x] + kk) & 0xFF);
    //println("Add kk to V[x] : ", hex(V[x]));
    break;

    it should be V[x] += kk
    try that please (and roll back that awful suggestion xD)

  6. #1036
    EmuTalk Member
    Join Date
    Jun 2017
    Posts
    10
    Mentioned
    0 Post(s)
    I got the same result as before.



    - - - Updated - - -

    I should note that the least frequent sprite appears randomly.

    Sometimes there are 4 of them, sometimes 3, sometimes 2 and even none of them sometimes.

    But they always appear at the beginning of the MAZE (in the top-left corner)

  7. #1037
    EmuTalk Member
    Join Date
    Aug 2016
    Posts
    25
    Mentioned
    0 Post(s)
    As you embraced the HLE path (implementing only the opcodes for an specific game) and seeing that your other opcodes are correct. The only thing that remains is your randomizer.
    in your 0xC000 when you step one instruction at a time... what does your randomNumber variable looks like?

  8. #1038
    EmuTalk Member
    Join Date
    Jun 2017
    Posts
    10
    Mentioned
    0 Post(s)
    I also think the problem comes from my randomizer.

    The value of the variable randomNumber alternates between 0 and 1 regularly.

    It seems correct
    Last edited by Okabe; June 8th, 2017 at 23:00.

  9. #1039
    EmuTalk Member
    Join Date
    Aug 2016
    Posts
    25
    Mentioned
    0 Post(s)
    That doesn't seem right... your random number AFAIK should be between 0 and FF 0-255
    Set Vx = random byte AND kk.

    Description of the opcode
    The interpreter generates a random number from 0 to 255, which is then ANDed with the value kk. The results are stored in Vx
    on my end it looks like this for 0xC000


    Vx = (rand() % 255 & kk);
    out of sheer exaustion of other options hahha this should be your culprit

  10. #1040
    EmuTalk Member
    Join Date
    Jun 2017
    Posts
    10
    Mentioned
    0 Post(s)
    I'm sorry, I didn't explain well.

    The value of randomNumber is either 0 or 1 after it's been compare with kk.

    Before that, the value of randomNumber is between 0 and 255.

    I just checked it.

Page 104 of 106 FirstFirst ... 45494102103104105106 LastLast

Similar Threads

  1. Nintendo DS specifications leaked
    By Gorxon in forum Gaming
    Replies: 37
    Last Post: June 25th, 2004, 22:16
  2. C&T 69000 video chip
    By Knuckles in forum TechTalk
    Replies: 4
    Last Post: June 16th, 2003, 00:43
  3. Rice's Daedalus 5.0.0 source code
    By Rice in forum 1964
    Replies: 19
    Last Post: June 15th, 2003, 09:39
  4. Replies: 18
    Last Post: December 7th, 2002, 10:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •