OBJECTS=isr.o tick.o wave.o analyzer.o scanner.o parser.o parser_helper.o compiler.o scheduler.o eval.o line.o apipe.o rpipe.o renderer.o cpustats.o shell.o ui.o main.o
-CFLAGS=-O2 -Wall -fsigned-char -fsingle-precision-constant -I$(MMEMUDIR)/include
+CFLAGS=-O2 -Wall -fsigned-char -fsingle-precision-constant -DEMULATION -I$(MMEMUDIR)/include
all: emu
spam.h: spam.raw
xxd -i spam.raw spam.h
-emu: $(OBJECTS)
+emu: bandfilters.h spam.h $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ -L$(MMEMUDIR)/src --start-group $(OBJECTS) -lmmemulation --end-group
.PHONY: clean
if(sc->terminals[i].valid) {
printf("R%03d ", i);
if(sc->terminals[i].isconst)
+#ifdef EMULATION
+ printf("%f\n", sc->terminals[i].id.x);
+#else
printf("%f\n", &sc->terminals[i].id.x);
+#endif
else
printf("%s\n", sc->terminals[i].id.name);
}
#include <irq.h>
#include <board.h>
#include <version.h>
-#include <hw/sysctl.h>
-#include <hw/gpio.h>
-#include <hw/interrupts.h>
#include <hal/brd.h>
#include <hal/mem.h>
%include {
#include <assert.h>
#include <string.h>
+ #include <stdlib.h>
#include <malloc.h>
#include <math.h>
#include "ast.h"
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <console.h>
#include <uart.h>
#include <board.h>
#include <hw/pfpu.h>
#include <hw/tmu.h>
+#ifndef EMULATION
#include <hw/sysctl.h>
#include <hw/gpio.h>
+#endif
#include <hw/interrupts.h>
#include <hal/vga.h>
*/
static void pfputest()
{
+#ifdef EMULATION
+ printf("Not supported in emulation\n");
+#else
unsigned int mesh[128][128];
unsigned int *pfpu_regs = (unsigned int *)CSR_PFPU_DREGBASE;
unsigned int *pfpu_code = (unsigned int *)CSR_PFPU_CODEBASE;
CSR_PFPU_CTL = 0; /* Ack interrupt */
irq_ack(IRQ_PFPU);
irq_setmask(oldmask);
+#endif
}
static void tmutest_callback(struct tmu_td *td)
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef EMULATION
+
+void ui_init()
+{
+}
+
+void ui_isr_key()
+{
+}
+
+void ui_tick()
+{
+}
+
+#else
+
#include <stdio.h>
#include <string.h>
#include <cffat.h>
refresh_screen();
}
}
+
+#endif /* EMULATION */
#define TMU_CTL_BUSY 0x01
#define TMU_CTL_IRQ 0x02
#define TMU_CTL_CHROMAKEY 0x04
-#define TMU_CTL_WRAP 0x08
#define CSR_TMU_HMESHLAST MMPTR(0x80006004)
#define CSR_TMU_VMESHLAST MMPTR(0x80006008)