Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU #32

Open
saku-koodari opened this issue Aug 30, 2016 · 5 comments
Open

CPU #32

saku-koodari opened this issue Aug 30, 2016 · 5 comments
Labels

Comments

@saku-koodari
Copy link
Owner

saku-koodari commented Aug 30, 2016

Start CPU This is now CPU general issue. This issue has at the moment highest priority.

Sub-tasks:

saku-koodari pushed a commit that referenced this issue Aug 30, 2016
@saku-koodari
Copy link
Owner Author

saku-koodari commented Aug 30, 2016

Due to loop, Cpu must running asynchronously along the form.

https://msdn.microsoft.com/en-us/library/mt679047.aspx
So you have to make an own thread for the loop

First I just do one, that go full speed. I do 100% speed later.

For the speed of loop, some specs:

  • Clock Speed: 4.194304 MHz
  • Horiz Sync: 9198 KHz
  • Vert Sync: 59.73 Hz

@saku-koodari
Copy link
Owner Author

saku-koodari commented Aug 30, 2016

based on this: http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/
the loop for emulator (Emulator.cs) could look like:

 // Emulation loop
  for(;;)
  {
    // Emulate one cycle
    // If the draw flag is set, update the screen
    // Store key press state (Press and Release)
  }

@saku-koodari
Copy link
Owner Author

saku-koodari commented Aug 30, 2016

(using same source than previous comment)
the emulate cycle:

  • Fetch Opcode
  • Decode Opcode
  • Execute Opcode
  • Update timers
    Those can just be method on LR35902.cs It doesn't need loop because there is a loop in Emulator.cs

@saku-koodari
Copy link
Owner Author

Bits are stored in little endian (reversed order)

@saku-koodari saku-koodari changed the title Launch CPU CPU Aug 30, 2016
@saku-koodari
Copy link
Owner Author

Remember that this issue is higly related with #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant