Skip to content

Instantly share code, notes, and snippets.

#include "sd.h"
//+==========================================+
//| initialization of the sd-card |
//+==========================================+
char SD_init()
{
DDRSP &=~ (1<<SPI_MISO); // sets pin MISO to an input
DDRSP |= (1<<SPI_MOSI); // sets pin MOSI to an output
DDRSP |= (1<<SPI_SS); // sets pin SS to an output
; iNES - Header
.inesprg 1 ; size of PRG-ROM, 16kB
.ineschr 1 ; size of CHR-ROM/RAM, 8kB
.inesmir 1 ; type of mirroring, 0 = horizontal, 1 = vertical
.inesmap 0 ; used mapper, 0 = no mapper
.bank 1
.org $FFFA
.dw 0 ; NMI_Routine($FFFA)
FAT16
sector0 = mbr
MASTER BOOT RECORD (512 bytes)
$0000 - $01FF
{
executable code (446 bytes)
$0000 - $01BD
partition 1
@Solvalou
Solvalou / Space Invaders - NES Assembly
Created May 17, 2010 18:13
Space Invaders NES Reconstruction
; iNES - Header
.inesprg 1 ; size of PRG-ROM, 16kB
.ineschr 1 ; size of CHR-ROM/RAM, 8kB
.inesmir 0 ; type of mirroring, 0 = horizontal, 1 = vertical
.inesmap 0 ; used mapper, 0 = no mapper
.bank 1
.org $FFFA
.dw int_return ; NMI_Routine($FFFA)
; iNES - Header
.inesprg 1 ; size of PRG-ROM, 16kB
.ineschr 1 ; size of CHR-ROM/RAM, 8kB
.inesmir 0 ; type of mirroring, 0 = horizontal, 1 = vertical
.inesmap 0 ; used mapper, 0 = no mapper
.bank 1
.org $FFFA
.dw int_return ; NMI_Routine($FFFA)