OSDN Git Service

driver ファイル名称変更
authorsato_tiff <sato_tiff@24ea1065-a21e-4ca1-99c9-f5125deb0858>
Sat, 22 Nov 2008 02:52:50 +0000 (02:52 +0000)
committersato_tiff <sato_tiff@24ea1065-a21e-4ca1-99c9-f5125deb0858>
Sat, 22 Nov 2008 02:52:50 +0000 (02:52 +0000)
git-svn-id: svn+ssh://svn.osdn.net/svnroot/unagi@73 24ea1065-a21e-4ca1-99c9-f5125deb0858

client/trunk/Makefile
client/trunk/driver_hongkongfc.c
client/trunk/driver_onajimi.c
client/trunk/driver_onajimi.h
client/trunk/hard_onajimi.h

index 7c8e72f..bfc3109 100644 (file)
@@ -17,9 +17,10 @@ unagi.res.o: unagi.rc unagi.ico
        windres -i $< -o $@
 
 #---- depend file ----
-driver_hongkongfc.o: driver_hongkongfc.c type.h hard_hongkongfc.h \
-  giveio.h
-driver_onajimi.o: driver_onajimi.c type.h hard_onajimi.h driver_onajimi.h
+driver_hongkongfc.o: driver_hongkongfc.c type.h paralellport.h \
+  hard_hongkongfc.h giveio.h
+driver_onajimi.o: driver_onajimi.c type.h paralellport.h hard_onajimi.h \
+  driver_onajimi.h
 file.o: file.c file.h type.h
 giveio.o: giveio.c giveio.h
 header.o: header.c type.h file.h header.h
@@ -27,4 +28,3 @@ script.o: script.c type.h file.h driver_onajimi.h giveio.h textutil.h \
   header.h script.h
 textutil.o: textutil.c type.h textutil.h
 unagi.o: unagi.c type.h driver_onajimi.h giveio.h file.h script.h
-
index 39649d4..d6cd608 100644 (file)
@@ -1,18 +1,9 @@
 #include "type.h"
+#include "paralellport.h"
 #include "hard_hongkongfc.h"
 //#include "hongkongfc.h"
 
 enum{
-       PORT_DATA = 0x0378,
-       PORT_BUSY,
-       PORT_CONTROL
-};
-enum{
-       ADDRESS_MASK_A0toA12 = 0x1fff,
-       ADDRESS_MASK_A0toA14 = 0x7fff,
-       ADDRESS_MASK_A15 = 0x8000
-};
-enum{
        PORT_CONTROL_MASK_XOR = 0x03, //bit01 invert
        PORT_CONTROL_READ = 0,
        PORT_CONTROL_WRITE
index 1da3d24..dee386f 100644 (file)
@@ -5,53 +5,12 @@ emuste.net 
 todo: 
 * Ê̤Υϡ¼¥É¥¦¥§¥¢¤ËÂбþ¤·¤¿¾ì¹ç¤Ï PORT_DATA ¤«¤é wait ¤Þ¤Ç¤ò¥Ø¥Ã¥À¤Ë¤Þ¤È¤á¤ë
 
-memo:
-* -O0 ¤Ê¤é inline asm ¤Ç¤âÈ¿±þ¤Ç¤­¤ë¤¬¡¢-O2 ¤À¤ÈÆ°¤«¤Ê¤¤
- * Í½ÁÛ¤ËÈ¿¤·¤Æ out ¤ÏÆ°¤¯¤¬¡¢ in ¤Ë wait ¤¬É¬Íפߤ¿¤¤
-* gcc ¤Î¥¢¥»¥ó¥Ö¥é¤Ï x86 ¤Ç¤¢¤í¤¦¤È src,dst ¤Î½ç¤Çȿž¤·¤Æ¤¤¤ë
-* http://download.intel.com/jp/developer/jpdoc/IA32_Arh_Dev_Man_Vol2A_i.pdf
- * out,in ¤Î¥¢¥É¥ì¥¹¤Ë dx ¤ò»È¤ï¤Ê¤¤¤È 8bit ¥¢¥É¥ì¥¹¤Ë¤Ê¤ë
- * out,in ¤Î¥Ç¡¼¥¿¤Ï¥ì¥¸¥¹¥¿¤Ç¥Ç¡¼¥¿Éý¤¬ÊѤï¤ë al:8bit, ax:16bit, eax:32bit
 */
-//#include <dos.h> ?
-//#include <windows.h>
 #include "type.h"
+#include "paralellport.h"
 #include "hard_onajimi.h"
 #include "driver_onajimi.h"
 
-#define ASM_ENABLE (0)
-enum{
-       PORT_DATA = 0x0378,
-       PORT_STATUS,
-       PORT_CONTROL
-};
-enum{
-       ADDRESS_MASK_A0toA14 = 0x7fff,
-       ADDRESS_MASK_A15 = 0x8000
-};
-#if ASM_ENABLE==0
-void _outp(int, int);
-int _inp(int);
-#endif
-
-static inline int bit_set(int data, const int bit)
-{
-       data |= 1 << bit;
-       return data;
-}
-
-static inline int bit_clear(int data, const int bit)
-{
-       data &= ~(1 << bit);
-       return data;
-}
-
-static inline void wait(void)
-{
-       //const long waittime = 100000;
-       //SleepEx(20,TRUE);
-}
-
 static inline void bus_control(int data)
 {
 #if ASM_ENABLE==0
@@ -140,10 +99,10 @@ static inline int data_bit_get(void)
                " movl %1,%%edx\n"
                " in %%dx,%%al\n"
                " movl %%eax,%0"
-               :"=q"(data) : "i"(PORT_STATUS) :"%edx", "%eax"
+               :"=q"(data) : "i"(PORT_BUSY) :"%edx", "%eax"
        );
 #else
-       int data = _inp(PORT_STATUS);
+       int data = _inp(PORT_BUSY);
 #endif
        data >>= 7;
        data &= 0x01;
index 8f0acb3..398ea79 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _PARALELLPORT_H
-#define _PARALELLPORT_H
+#ifndef _DRIVER_ONAJIMI_H_
+#define _DRIVER_ONAJIMI_H_
 
 void reader_init(void);
 void cpu_read(long address, long length, u8 *data);
index c41facf..0ac8186 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _KAIRO_H_
-#define _KAIRO_H_
+#ifndef _HARD_ONAJIMI_H_
+#define _HARD_ONAJIMI_H_
 /*
 STROB: CPU/PPU ADDRESS BUS control
 L Address reset, address = 0