OSDN Git Service

[VM][I386][COMMON_VM] Integrate to upstream.Use vm/i386.[cpp|h] instead of libcpu_new...
[csp-qt/common_source_project-fm7.git] / doc / ABOUT_eFM7_1.en.txt
1 2016 New Year Anniversary & eFM-7 porting 1st anniversary,
2 "Various things others and eFM-7"
3       Jan 1,2016 K.Ohta <whatisthis.sowhat _at_ gmail.com>
4
5 * Sorry, this document is written in Japanese only, I can not use english well.
6   If you interest of this and you can translate from Japanese to any languages,  please translate this.
7   This document is released with GFDL, you can copy and redistribute this document under GFDL.
8   This document is written with UTF-8,and in the form along the GFDL (GNU Free Document License), you can copy and redistribute.
9   
10   Since English is poor write only Japanese, sorry (´・ω・`)
11   If you have some people that can be translated from Japanese into other languages,pls. tell me m(_ _)m
12
13 * Important Notice: This article has translated by GOOGLE TRANSLATION from Japanese, still not correct this article. *
14
15 1. About this (literally)
16 As the previous stage to make a eFM-7, Common Source Code Project (below CSP) from the beginning the porting to Qt + OpenGL, first anniversary in December 30 last year in the previous year (2014). So, maybe the historical value once after perhaps 30 years, I think (^_^;.
17 So, I thought to record the various miscellaneous things about emulators of Fujitsu FM-7.
18
19 2. Prehistory: XM7/​​SDL
20 From the front, there was a very good FM-7 emulator [1] say XM7. However, this works only on Windows. At the time of what was in 2008? or 2009, I wish to work this on the GP2X [2], South Korea's portable game machine, especially want to work the Xanadu. I ported XM7 to *nix [3] there were licensed. (Thanks to Mr.PI. author of EM7, base of XM7,
21 and Mr.Takegami, the author of XM7 et al). Mr.PI. agreed cheerfully, however Mr.Takegami suspected to able to port this, he was suspicious, but I ported to SDL and Gtk ,the code and screen shots but was temporarily porting, I show this to them, I was able to relatively easily license, began a full-scale work.
22
23 [1] http://retropc.net/ryu/xm7/ current development end
24 [2] https://ja.wikipedia.org/wiki/GP2X
25 [3] Eventually we gave up the porting to GP2X system in the machine specs problem, but ...
26
27 In the first period, I ported XM7 referring to the Mr.Gimons has been ported to Gtk at about 2005, porting  began from the place to port XM7 the latest version of the Gtk and SDL at that time.
28 Then,only reason not working in GP2X that it Gtk, I lokked for GUI toolkit only with SDL, found AGAR[4] to port.
29 [4] http://www.libagar.org/
30
31 At the time, I had sickness more and more seriously, typing keyboard with bedridden verge in a situation not a few even day to hit from the futon (bed), even if I wad always died considering now and was the state was not at all funny, sew the interval that does not move the body in a disease.
32 But it became of work, the head of 2010, out that there is a reasonably practical came.
33 <B> However, with the exception of the Agar's problems that a buggy </ B>.
34 So, I debugged one by one their bugs, then thinking seriously load balancing on the way to off-load of from multi-threaded [5] to OpenCL done before and after 2011,it is developed on the went to become sluggish.
35
36 [5] This is also utilized to eFM-7 and CSP / Qt. OpenCL is, although I think that the future is not probably do so performance does not come out.
37    
38 Upstream (Tagegami's version XM7) had by almost completed,and I might have noticed the importance of radio in the Great East Japan Earthquake (2011-03-11), I mainly focused to work of Open I2C Radio [6] [7] project.
39
40 [6] https://osdn.jp/projects/openi2cradio/
41 [7] http://sky.geocities.jp/artanejp/
42
43 All told, until close to the end even 2014, the two projects advanced, Open I2C Radio is almost stable in the mid of 2013 (I think it was).As the next project, USB dongle for DigitalTV(DVB or One-Segment ISDB) using RTL2832U.
44 Did the project (listed in [7]) to be diverted to it to receive a shortwave and medium wave ,I had interest.
45
46 3.About XM7
47 In the first place, pull the EM7 that was able to prototype a time when C++ is not performance is put out too much in order to have in the footsteps, and the GUI part and FM sound source emulator of C++,that the C language of the body, but there is a very incongruous, yet also certainly to performance also out accuracy thing that was better than my eFM7. And ,I was using the UI and SDL of C++ center of adding the renderer, become a chaotic.I desired to re-create from this by scratch at mid-2014 (penitence). 
48 St the same time, Germany emulator collector (Is calling right?), Anna Wu had interact with Mr. Takegami from around mid-2014 , but ultimately Takegami Mr. and around the exchange of in English is reluctant, there was the fact that dispute.
49
50 I was looking at the process in Twitter, I'm sick to deats of them,that I don't use English well,very poor,but I usually report bugs in Debian GNU / Linux [8] etc and join discussion on the development in English communities where necessary, so I felt something wrong strongly to the process.
51 I feel uncomfortable. I think, "I don't be a place to here are of their own".
52 And I complain to an old friend about this, well also to foreign manufacturers in the person work it does not is probably well-known to because it was a person (I can't put out the name to go, technical force domestic I think the top class of programmers), listening to grumble ... "Your feeling is right, your stance is me too(^ ^) ", I mean that was pushed in the back.Whether it was December 28, 2014.
53 After all, in the direction of porting the FM-7 system to CSP, off the rudder, git on December 30, 2014
54 To build a repository [9], it means you put the source code at the time of the latest CSP there it is.
55
56 [8] Coincidentally, on December 28, 2015, Mr. Ian Murdok was suicided by the police assaulting. It was 42.
57 [9] https://github.com/Artanejp/common_source_project-fm7
58
59 4.Start Porting of CSP
60 In porting, the first for the tool kit was using Agar.
61 <B>Would work the time being. Because it is easier to verify the work say that is </ B>.
62 So, it was the first to work the X1 Turbo and PC-8801MA. [10]
63 But, since Agar was having to buggy portability and having various problems, another highly versatile.
64 It means require to decide using the another tool kit as GUI. [11]
65
66 [10] Since the software for operation verification there were a lot (^_^;
67 [11] The other, move in GP2X gave up (^_^;
68
69 Then, What shall to use ? Although I thought and, Gtk was needed another midlle wares since Gtk3, was
70 not good impression there is also abundance of Gnome 3's bugs,<B>So, I will use Qt I had never used at all. </B> .
71 I surveyed Qt4, the sound relationship and the joystick did not have a standard in (with Qt4 and 5.4) ,
72 SDL to do sound and Joystick, around drawing required OpenGL. Mercy is not.
73 By say, make a rough policy,  went to the porting.The work itself is, there is no unity even dirty
74 extremely're using in fumbling the Qt code although there were in, in it is possible to put the majority
75 of the VM in March of 2015 it has led.
76
77 Looking at the git log,
78   - On January 8, X1 almost was roughly passed to compilation, with Agar
79      (After a little commit fc894319809e05692fd447a5f232a46ebdf17c7)
80   - On January 10, I gave up to be spoiled of Agar, decided to convert to Qt
81      (Commit 98ac2645ec6a3798072445ac003f08d529d6065c)
82   - On January 11, it came to the compiler passes with Qt
83      (Commit 1033cc86e36b8e1d38771ef404e7d43ad07ebb39)
84   - On 12 January, the basis of the drawing system and the GUI has worked and working VM?
85      (However, there had a bug a lot)
86      (Commit e5887aa7464c7276eef9d2578ea880988f3da60d)
87   - On January 13, a keyboard part had worked and bugs around the drawing system were resolved.
88      (Commit 6deec5abac027eca1a71fa89e485650d3c9735da)
89
90 Feeling called, started on December 30, trying to somehow Agar is there from 10 days it was,
91 to switch to Qt became various unpleasant, the basis for the Qt application in a day.
92 Design is increased, in one week from there, went finished the portion become now of foundation
93 is a translation. From there, so go as fast to work some of the VMs, until January 28.
94 Proceed [12], the full-fledged implementation of the FM-7 to to move an existing VM from there
95 was a translation that began to. [13]
96
97 [12] commit ce574213769b2685ead0df84c81f193e519d3906 later
98 [13] Although the December 31, 2014 I had tried to implement of FM-7,
99      (Commit e409be1add5f6b9ddf76bada7c24469cb35ae2bc later),
100      but counldn't be kept going to develop a lot, I decided to prioritize
101          to apply upstream of CSP to Agar and Qt.
102
103 5.eFM-7
104   Well, reached to this stage, this is time to porting FM-7. Next, I got the 1980's magazined at my mother's home; Oh!FM.I begin to make FM-7's emulator based oin I/O map (written in Oh!FM and the WEB) of FM-7 and code of upstream CSP, and  I did in consideration of updtream XM7's source code.
105   I re-construct codes of FM-7 emulator, because I don't wish to violate any copyrights. From February to March of 2015, I implemented of the FM-7 (to CSP).
106 Then, at  March 11, 2015 (coincidentally's day from the Great East Japan Earthquake of the four-year anniversary!),
107 still not work, but linking had succeeded [14], after this, I fixed mistake of implementation of 6809 MPU part [15] and, fixed "F5F6F7"(時分秒) disk format behavior inherence of MB8877 specification to disk.cpp / mb8877.cpp [16] , then at the end of March is, a lot of software for the FM-7 had warked. [17]
108
109 [14] commit 65fe797cd5a681ba25c14a88566d7c80d0a8cd9a
110 [15] This issue has roots in mc6809.cpp code was based on older version of MAME  around that time.Of course, it was not implemented miscellaneous undefined instructions,behaviors of the condition-flags of CPU had also problems.
111 Modify work around here is not trailing until November of 2015, I went to Kanagawa prefectural library at Kawasaki, to get a lot of (had been destroyed in my parents) material, including the portion other than the MC6809 went piled modifications to the modification.
112 Now of mc6809.cpp I'm thinking that there is no hindrance to say that the final version. But dirty coding(^_^;
113 [16] MB8877 is, the F5, F6, F7 in the data column of the time format in command for the FDC since it has been assigned, and sector number F5~F7 is not to write.
114      In the 1980s, softwares that uses this in a personal computer to copy protection were a lot, because disf format using F5~F7 character code at the sector numbers or outside of sectors were a "hours, minutes and seconds special format"(時分秒フォーマット).
115      This checks the F5, F6 and F7 code when it was written in the sector id and the gap of track or or, it had aimed at the copy protection = protection by putting an important program time was, but many of the copy tool (such as CopyBoy7) is only in the disk drive of the user.
116      Since it was able to reproduce the 時分秒 format, copy protection used special data called "unstable data bits shift"(不安定ビットずれデータ).This was put in sector,and checks pattern of bit shift to check be master diskette.Both 時分秒 and unstable bit shift were used same copy protection mostly.
117 [17] commit 3c875fb911e484c15bfdad2f67dadb9bdedd5e75
118
119 Next, I aimed a target was FM77AV.
120 This have gained a unique device that said MMU and logical operations, linear interpolation LSI (ALU).The basic command sequence of the ALU, was referring to the XM7.
121 Internal biggest reason Takegami and Mr Anna was dispute is, MESS is a device of this neighborhood to be a description from XM7 it was round rip-off, but protested through Anna by Mr.Takegami, MESS community was absolutely no answer. Caused by this issue, I was careful to write around there wspecially than other parts. [18]
122 Currently, it works well behaved specifications, maybe not able to fine-ALU hack ...(i.e. drawing the character of the PSY-O-BLADE).
123 Since it has come out is somewhat of a problem with the timing calculation, we are asked to fix opportunity.
124
125 [18] In the internal structure of the ALU, what is written using the division operation of the C language in a straight line interpolation function, it is actually from this reasons.
126
127 Including around here, I often throw binaries to "Old days of the PC"(or called retro-PC) board of the ni-channels(2nちゃんねる) the PC emulator board to listen to the bug report and improvement plan to thread inhabitant was about that day.
128 Also became way, I think it was from around here. At the time, CSP for Qt did not work in Windows. There is the but (would be worked later).
129 This work was been difficulties in Somehow, as most of the softwares were run without inconsistency.It was about June 16. It is at stake after all three months. [19]
130
131 [19] commit 1b4320ef6229e75013478fe1ec66ed1eb3c47bd5
132
133 The following is, I made the FM-77. This was pushed forward without so much painful. However,I gave up to implement the 400 line part of the FM-77L4 .
134 --- maybe done (but maybe contains bugs a lot) 20161006 ---
135
136 However, where the boot sequence and memory map is different in subtle as well as FM-7 both 77AV is.
137 Become overlooked likely, There was also that the notice from the post. In particular boot RAM around.
138
139 Well, you come up here, to DMAC implement other FM77AV40EX, inevitably.
140 But is the translation ... or when the software increases have been spouting a variety of bugs that move, we have to various groped.
141 So no, it took several months here Somehow.
142 Much of this time of the outcome, it has been fed back to the work of Takeda's CSP authorship.
143 Takeda-san, thank you very much m(_ _)m
144
145 ... And, on the 14th of September, AV40EX also is almost all right [20], apply to Windows from there.
146 And, it is a translation that will let go transplanted all of the VM.
147 FM-8 has got a Yaruyaru fraud, but thought I going to do sloppy.
148
149 [20] commit bbf5ed7132304d6e4c19da3cb2d634923eb55a5b per
150
151 Then, build a Windows-friendly cross-development environment of using MinGW in one month less than from there.
152 Or, to absorb the difference in the library of API, as much as possible included in the binary package for Win32.
153 So as to, while debated of via two channels of Takeda's, leading to the now.
154 It is a translation.
155
156 5. In the last moment
157 CSP also, Qt application version is also, we are still evolving. Some are proposed from my side, Takeda
158 Mr. also some things and those yelling put the proposal of the two channels of the thread residents to propose.
159 Such, of being able to something like FOSS of the best part is, I think that really be nice.
160 And, with respect to the FM-7 system, so it can not be denied especially sweet validation of AV system, doing a lot
161 Ku that there will be a pattering. But, well, because we will be doing from now on self-paced,
162 Including everyone of Takeda-san and user, everyone thank you m(_ _)m
163
164                                2016 1.1 K.Ohta <whatisthis.sowhat _at_ gmail.com>
165
166 ※ Postscript:
167
168 6. Bonus 1:
169   How many with respect to the "1/60 of a second problem."
170   The emulator, you may say, '1/60 second problem ".
171   Thee actual display, and speed of the display of the vertical retrace that emulation is different
172 for reasons that says are often the case that the timing to synchronization is not taken, the actual display at a minimum of.
173 What to do with the 1 of frame = 1/60th of a second of the deviation occurs. The story to say that, to eliminate this deviation,often debate will occur not.
174 Something emulator you sell a deviation of less than 1/60 seconds, there you'll ne.
175 My position is something that "can not be helped even out up to 2 frames".
176 And say what it, one frame of delay a thing coming out of the difference between the out of the box, and the other 1 frame of delay, the DirectX and OpenGL that is caught between, was drawn to the "front of the frame period eliminate flickering by displaying things"structure have been commonly available on the OS side of the host machine,so the side is because that touch directly from the application may be difficult.
177 In other words, (if vertical retrace frequency is significantly different from a little more), the worst in two frames of about displacement more than vertical retrace frequency of Display is different Let's think of the can not be avoided. By say.
178 It is not intended normal applications do to stick up there, relaxation in the setting of the OS side
179 I It is a story that is also, if possible.
180 Ultimately, it would should I ask CSP side synchronized VBLANK interrupt the OS side is prepared,
181 Is Naa somehow think up such a thing. And, I think personally. So sides, the CSP
182 Please try it in people to customize based on (probably fairly or GL or Direct X or Vulkan
183 Since the code will change ...). GPLv2 is there also for that. I think such as(^_^;
184
185
186 Revision history:
187 * On the basis of you pointed out in the 2016-01-05 2 channel emulator comprehensive attrition,
188 some review the description of the facts to get a license. After, add 6. Section.
189  
190 * To point out about the representation of the hour, minute and second protect / format when in 2016-01-07 ↑ of the plate,
191            Have appended correction (fear s)
192