Skip to content

Instantly share code, notes, and snippets.

View Jakemangan's full-sized avatar

Jake Mangan Jakemangan

View GitHub Profile
public void test_SBC_DecimalMode() throws MemoryAccessException {
bus.write(0xab40, 0x01);
bus.write(0xab50, 0x11);
bus.loadProgram(0xf8, // SED
0xa9, 0x00, // LDA #$00
0xf9, 0x10, 0xab); // SBC $ab10,Y
cpu.setYRegister(0x30);
cpu.step(3);
assertEquals(0x98, cpu.getAccumulator());
begin
LDA #10 ;load $0A into accumulator
LDX $15 ;load $15m into X
_loop TAX ;transfer A to X
SEC ;set carry flag
end
//exposes the parts of the model needed elsewhere. Such as the fire function called by the controller.
#include <math.h>
#define PI 3.14159265358979323846
typedef struct particle{
float x;
float y;
//handles updating the game state, moving the objects, and handling collisions.
#include <stdlib.h>
#include <time.h>
#include "gamestate.h"
#include <mbed.h>
//missiles
static const int heapsizeM = 20;
static node_t heapM[heapsizeM];