This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
architecture pcengine { | |
include: "pcengine.lua", | |
wordsize: 8b, | |
fetchsize: 8b, | |
endian: LSB, | |
memory: [ | |
mem_bss: { name: "work ram", size: 8KB, start: 0x1f0200 }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.include "system.inc" | |
.include "startup.asm" | |
.include "mb128.asm" | |
.include "font.inc" | |
main: | |
sei | |
; Upload font. | |
lda #low(font_8x8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;---------------------------------------------------------------------- | |
; name : asl.w | |
; | |
; description : Left shift 8 bit value, 16 bit result | |
; | |
; in : A number of bits to shift [0-f] | |
; X value | |
; | |
; out: A low nibble | |
; Y high nibble |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bbba_aaaa <- 4 lda input | 4 lda input | |
dccc_ccbb 2 and #$1f | 2 and #$1f | |
eeee_dddd 4 sta output | 4 sta output | |
ggff_fffe | |
hhhh_hggg | |
bbxx_xxxx 6 asl input 4 lda input+2 | 4 lda input+1 4 sta ouput+3 | |
cccc_cbbb 6 rol input+1 2 and #$1f | 4 sta r0 | |
eeed_dddd <- 6 rol input+2 4 sta output+3 | 4 lda input+2 | |
gfff_ffee 6 rol input+3 | 6 asl r0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char g_welcomeMsg[] = "Welcome!"; | |
#define CH_NUL 0x00 | |
#define CH_BACKSPACE 0x08 | |
#define CH_CANCEL 0x18 | |
#define CH_SUBSTITUTE 0x1a | |
#define CH_ESCAPE 0x1b | |
#define CH_SPACE 0x20 | |
#define CH_CSI 0x9b | |
#define CH_ST 0x9c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include "DataFlash.h" | |
#include "Dummy.h" | |
class DataFlashFixture | |
{ | |
public: | |
static const int8_t CHIP_SELECT = 5; | |
static const int8_t RESET = 6; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CALL_GLPROC(GenFramebuffers)(FRAMEBUFFER_COUNT, framebuffer); | |
for(i=0, j=0, texId[TEXTURE_COUNT]=0; i<=NORMALIZE;) | |
{ | |
CALL_GLPROC(BindFramebuffer)(GL_FRAMEBUFFER, framebuffer[i++]); | |
CALL_GLPROC(FramebufferTexture2D)( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texId[g_fboTexId[j++]], 0 ); | |
CALL_GLPROC(FramebufferTexture2D)( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, texId[g_fboTexId[j++]], 0 ); | |
} | |
for(i=0; i<SCALE_COUNT; i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;--------------------------------------------------------------------- | |
; Turbo-Everdrive SD card library | |
;;--------------------------------------------------------------------- | |
SPI_SS = 0 | |
SPI_FULL_SPEED = 1 | |
SPI_AREAD = 2 | |
STATE_SPI = 0 | |
STATE_RY = 1 | |
STATE_FIFO_WR = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fractional Brownian motion | |
float fBm(const glm::vec3 pos, const int octaveCount, float lacunarity, float gain ) | |
{ | |
float noiseSum = 0.0; | |
float amplitude = 1.0; | |
float amplitudeSum = 0.0; | |
glm::vec3 sample = pos; | |
for( int i = 0; i < octaveCount; ++i ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "BufferObject.h" | |
BufferObject::BufferObject() : | |
_id(0), | |
_target(GL_NONE), | |
_size(0), | |
_usage(0) | |
{} | |
BufferObject::~BufferObject() {} |