Skip to content

Instantly share code, notes, and snippets.

View emoon's full-sized avatar
:octocat:
Hacking on stuff!

Daniel Collin emoon

:octocat:
Hacking on stuff!
View GitHub Profile
@emoon
emoon / .h
Last active August 3, 2016 03:09
#define PDMENUFUNCS_GLOBAL "Menu Service 1"
typedef uint64_t PDMenuHandle;
typedef uint64_t PDMenuItem;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
enum {
PDMENU_FLAGS_ENABLED = 1 << 1,
PDMENU_FLAGS_DISABLED = 1 << 2,
const Memory* makeRef(const void* _data, uint32_t _size, ReleaseFn _releaseFn, void* _userData)
{
MemoryRef* memRef = (MemoryRef*)BX_ALLOC(g_allocator, sizeof(MemoryRef) );
memRef->mem.size = _size;
memRef->mem.data = (uint8_t*)_data;
memRef->releaseFn = _releaseFn;
memRef->userData = _userData;
printf("make makeRef %p\n", &memRef->mem);
return &memRef->mem;
}

The more stuff I add to minifb the more I actually want to use it in some other projects (like ProDBG) as I'm almost doing double work/cut'n'pasta now. So I have considered extending minifb somewhat that might break the current API.

Window::new(title, width, heigh...) <- this is all good but i'm thinking off perhaps adding something like

Window::new(title, width, height, Option<Scale>, Option<WindowStyle>) (style is for resize and such)

window::update_with_buffer(&buffer) <- rename of the current update function.

Name | ID | MV | RB | DB | F1 | F2 | XFDPFF_#?
-------------------------------+------+----+----+----+----+----+-----------
BOND Cruncher | 807D | 39 | ++ | ++ | -- | -- | DATA
TrashEliminator 1.0 | 8075 | 39 | ++ | ++ | -- | -- | ADDR
ByteKiller 1.3 | 8011 | 39 | ++ | ++ | -- | -- | ADDR
ByteKiller 2.0 | 8012 | 39 | ++ | ++ | -- | -- | ADDR
ByteKiller 3.0 | 8013 | 39 | ++ | ++ | -- | -- | ADDR
ByteKillerPro 1.0 | 8014 | 39 | ++ | ++ | -- | -- | ADDR
ByteKillerPro 1.0 Pro | 8015 | 39 | ++ | ++ | -- | -- | ADDR
ByteKiller 97 | 8089 | 39 | ++ | ++ | -- | -- | ADDR
@emoon
emoon / minifb.rs
Last active December 8, 2015 18:11
enum Vsync {
On,
Off,
}
enum Scale {
FitScreen,
1X,
2X
4X,
bytes fnv farm xx horner sip
1 1000 38 66 58 62
2 2000 74 117 117 117
4 4000 133 235 210 222
8 2666 242 500 500 421
16 2285 347 888 842 761
32 1684 296 1600 1454 1103
64 1361 435 2782 2461 1488
128 1122 603 4571 4000 1753
256 1028 792 6243 5818 1924
extern crate libc;
#[repr(C)]
struct ApiFromC {
some_data: *mut libc::c_void,
some_function: extern fn(data: *mut libc::c_void),
// ...
}
struct RustAPI {
fn main() {
println!("Hello World!");
}
0x30672: abcd.b d3, d1
0x30674: abcd.b -(a6), -(a6)
0x30676: add.w a4, d2
0x30678: add.l #$af, d4
0x3067e: add.w d3, a0
0x30680: addi.b #$b4, d4
0x30684: addq.w #$3, a5
0x30686: addx.b d4, d7
0x30688: addx.b -(a6), -(a0)
0x3068a: and.w #$31, d6
// ImGui - standalone example application for Glfw + OpenGL 3, using programmable pipeline
#include <imgui.h>
#include "imgui_impl_glfw_gl3.h"
#include <stdio.h>
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
#include <math.h>
#include <string.h>
#include <vector>