Emulator build instructions
Emulator build instructions
How to build the bloody thing!
Linux build instructions
1. Prerequisites: libsdl-dev and a g++ toolchain
2. Download the source from one of these forum threads (not sure where else to get it)
3. Modify the SDL include line (was line 36 for me with the zip i got )
from
to
3. g++ -O3 -lSDL avr8.cpp -o uzem
2. Download the source from one of these forum threads (not sure where else to get it)
3. Modify the SDL include line (was line 36 for me with the zip i got )
from
Code: Select all
#include "SDL.h"
Code: Select all
#include "SDL/SDL.h"
Last edited by etamme on Tue Dec 23, 2008 1:42 am, edited 1 time in total.
-
- Posts: 252
- Joined: Tue Dec 02, 2008 12:38 am
- Location: Carlsbad, California (USA)
Re: Emulator build instructions
I'm not sure modifying the source code is necessary -- here's how I build it on my mac: (note the -I directive)
gcc -O3 -DGUI=1 -I /usr/local/include/SDL avr8.cpp -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -lstdc++ -o uzem
gcc -O3 -DGUI=1 -I /usr/local/include/SDL avr8.cpp -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -lstdc++ -o uzem
Re: Emulator build instructions
Hey guys..I am getting an error when I run the g++ -O3 -lSDL avr8.cpp -o uzem part. Here is what I get (also I'm running ubuntu 8.10 and my SDL/gcc have been updated):
arlan@arlan-dev:/usr/include$ sudo g++ -O3 -lSDL avr8.cpp -o uzem
avr8.cpp: In member function ‘u8 avr8::exec(bool, bool)’:
avr8.cpp:1398: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
Any ideas on what I may be doing wrong?
~Telthos
arlan@arlan-dev:/usr/include$ sudo g++ -O3 -lSDL avr8.cpp -o uzem
avr8.cpp: In member function ‘u8 avr8::exec(bool, bool)’:
avr8.cpp:1398: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
Any ideas on what I may be doing wrong?
~Telthos
-
- Posts: 252
- Joined: Tue Dec 02, 2008 12:38 am
- Location: Carlsbad, California (USA)
Re: Emulator build instructions
I'm curious what platform you're on? Something other than x86? The warning is harmless -- u32 is typedef'd to unsigned long so strictly speaking the format specifier should be %lu and not %u. Or u32 should be typedef'd to just unsigned.Telthos wrote:Hey guys..I am getting an error when I run the g++ -O3 -lSDL avr8.cpp -o uzem part. Here is what I get (also I'm running ubuntu 8.10 and my SDL/gcc have been updated):
arlan@arlan-dev:/usr/include$ sudo g++ -O3 -lSDL avr8.cpp -o uzem
avr8.cpp: In member function ‘u8 avr8::exec(bool, bool)’:
avr8.cpp:1398: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’
Any ideas on what I may be doing wrong?
~Telthos
-Dave
ps. I thought the forums were totally dead for weeks, and finally noticed that "automatic login" had been turned off so I was never seeing "new posts o' red"
Last edited by DavidEtherton on Tue Mar 31, 2009 4:45 am, edited 1 time in total.
Re: Emulator build instructions
hehe, I had the same problem.DavidEtherton wrote:ps. I thought the forums were totally dead for weeks, and finally noticed that "automatic login" had been turned off so I was never seeing "new posts o' red"
Re: Emulator build instructions
Yeah, it also happened to me! I really don't know what happened, some glitch with phpBB....Perhaps I should put a warning in the header to check your login!
Uze
Uze
Re: Emulator build instructions
I second that. For a little while, I thought the entire community died on it's feet.uze6666 wrote:Perhaps I should put a warning in the header to check your login!
Tango D Library http://www.dsource.org/projects/tango
D Dynamic Libraries - http://www.dsource.org/projects/ddl
Enki Parser Generator - http://www.dsource.org/projects/ddl/wiki/Enki
D Programming Language - http://www.digitalmars.com/d
D Dynamic Libraries - http://www.dsource.org/projects/ddl
Enki Parser Generator - http://www.dsource.org/projects/ddl/wiki/Enki
D Programming Language - http://www.digitalmars.com/d
A Makefile
My workspace has the SDL library release installed under minGW in Windows. If this sounds like your setup, feel free to give this makefile a shot. YMMV.
NOTE: you'll have to replace the indentations on each line with TAB characters. BBCode keeps replacing them with spaces.
NOTE: you'll have to replace the indentations on each line with TAB characters. BBCode keeps replacing them with spaces.
Code: Select all
TARGET = uzem.exe
GCCBASE = c:\minGW
CPPFLAGS = -O3 -I$(GCCBASE)\include
CPPFLAGS += -I$(GCCBASE)/include/SDL -D_GNU_SOURCE=1 -DGUI=1
LFLAGS += -L$(GCCBASE)/lib -lmingw32 -lSDLmain -lSDL
OBJECTS = avr8.o
$(OBJECTS): %.o: %.cpp
g++ -c $< -o $@ $(CPPFLAGS)
$(TARGET): $(OBJECTS)
g++ $(OBJECTS) -o $(TARGET) $(LFLAGS)
all: $(TARGET)
run: clean all
$(TARGET)
debug: clean all
$(TARGET) test.hex
clean:
-@rm $(OBJECTS) $(TARGET)
Tango D Library http://www.dsource.org/projects/tango
D Dynamic Libraries - http://www.dsource.org/projects/ddl
Enki Parser Generator - http://www.dsource.org/projects/ddl/wiki/Enki
D Programming Language - http://www.digitalmars.com/d
D Dynamic Libraries - http://www.dsource.org/projects/ddl
Enki Parser Generator - http://www.dsource.org/projects/ddl/wiki/Enki
D Programming Language - http://www.digitalmars.com/d