for dir in $(DIRS); do \
make -C $$dir clean; \
done
- rm -rf bin
+ rm bin/motonesemu bin/vgadisp bin/famicon-controller.jpg
--- /dev/null
+#!/bin/bash
+
+if [ ! -e vgadisp ] ; then
+ echo vgadisp command not found!
+ exit -1
+fi
+
+if [ ! -e motonesemu ] ; then
+ echo motonesemu command not found!
+ exit -2
+fi
+
+./vgadisp &
+vga_pid="$!"
+
+echo -e "\n\n\n\nWelcome to MOTO NES EMULATOR"
+echo -e "\n\n\n\n .....press ctl-C to terminate emulator.\n\n\n\n"
+./motonesemu $1
+
+#clean up
+#echo vga: $vga_pid
+
+kill $vga_pid
+
+ipcs -m -p > ipclist
+#cat ipclist
+
+shmid=$(awk "{ if (\$3 == $vga_pid) print \$1}" < ipclist)
+#echo shmid: $shmid
+rm ipclist
+ipcrm -m $shmid
+
+
#!/bin/bash
-test ! -e bin && mkdir bin
cp emulator/motonesemu bin/
cp display/vgadisp bin/
cp emulator/joypad/famicon-controller.jpg bin/
return NULL;
}
}
+ //printf("shmid:%d\n", shmid);
/* Attach (map) the shared memory segment into the current process */
if((ret = shmat(shmid, 0, 0)) == (void*)-1)