Source

OCaml-Chip8 / src / chip8.ml

Diff from to

src/chip8.ml

 ** <pierre.surply@gmail.com>
 ** 
 ** Started on  Sat Aug  4 21:06:50 2012 Pierre Surply
-** Last update Sun Aug  5 18:11:13 2012 Pierre Surply
+** Last update Mon Aug  6 10:57:18 2012 Pierre Surply
 *)
 
 open Opcode
   chip8.v.(x) <- (Random.int 256) land kk
 
 let drw_vx_vy_nibble x y n = 
-  (*chip8.v.(0xF) <- 0;
-  for k = 0 to n-1 do
-    let code = chip8.mem.(chip8.i+k) in
-    let py = (chip8.v.(y)+k) mod h in
-    for j = 0 to 7 do
-      let px = (chip8.v.(x)+j) mod w in
-      let b = code land (1 lsl (7-j)) != 0 in
-      let lp = display.pixels.(px + py*w) in
-      display.pixels.(px + py*w) <- b;
-      if display.pixels.(px + py*w) != lp then
-	chip8.v.(0xF) <- 1
-    done
-  done*)
   chip8.v.(0xF) <- 0;
   for k = 0 to n-1 do
     let code = chip8.mem.(chip8.i+k) in
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.