mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 13:27:41 -07:00
add more crap
This commit is contained in:
parent
cfdfd4b231
commit
5b7ae6dab3
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
bin
|
||||
obj
|
42
NDS.cpp
Normal file
42
NDS.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
#include <stdio.h>
|
||||
#include "NDS.h"
|
||||
|
||||
|
||||
namespace NDS
|
||||
{
|
||||
|
||||
//
|
||||
|
||||
|
||||
void Init()
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
FILE* f;
|
||||
|
||||
f = fopen("bios9.bin", "rb");
|
||||
if (!f)
|
||||
printf("ARM9 BIOS not found\n");
|
||||
else
|
||||
{
|
||||
// load BIOS here
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<typename T> T Read(u32 addr)
|
||||
{
|
||||
return (T)0;
|
||||
}
|
||||
|
||||
template<typename T> void Write(u32 addr, T val)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
18
NDS.h
Normal file
18
NDS.h
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
#ifndef NDS_H
|
||||
#define NDS_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
namespace NDS
|
||||
{
|
||||
|
||||
void Init();
|
||||
void Reset();
|
||||
|
||||
template<typename T> T Read(u32 addr);
|
||||
template<typename T> void Write(u32 addr, T val);
|
||||
|
||||
}
|
||||
|
||||
#endif // NDS_H
|
9
main.cpp
9
main.cpp
@ -1,9 +1,12 @@
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include "NDS.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
cout << "Hello world!" << endl;
|
||||
printf("melonDS version uh... 0.1??\n");
|
||||
|
||||
NDS::Init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
15
types.h
Normal file
15
types.h
Normal file
@ -0,0 +1,15 @@
|
||||
// types, common crap
|
||||
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned long int u64;
|
||||
typedef signed char s8;
|
||||
typedef signed short s16;
|
||||
typedef signed int s32;
|
||||
typedef signed long int s64;
|
||||
|
||||
#endif // TYPES_H
|
Loading…
Reference in New Issue
Block a user