-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FM Towns support #729
Comments
Any documentation on the platform? In what way is it different from IBM PC or NEC PC-98? Any emulators I can test against? |
I don't have any documentation, but MAME already supports FM Towns I believe. |
The only mature FM-Towns emulator is Unz (as commented by @landloafer), but unfortunately it's not open source. |
Would anyone be OK with forking DOSBox-X and writing FM towns emulation? I'm focused on code cleanup and bug fixes at the moment, so adding yet another emulation mode at this time would be counterproductive. If I merge changes from the fork later, I will make sure to note in the code, README, and commit messages that they came from your fork. |
If you're willing to cope with Japanese and with a tad of tables: No, seriously, the amount of detail it goes into is ridiculous 0_0
Not much of an idea really (I just got that file because somebody wanted me to look into the YM2612 section), but I think it's about as much as PC-98 differs from IBM PC, i.e. differs at everything except the CPU and having yet another variant of DOS. Oh, and it has the particularity that the CD drive had been standard since day one (which brought in the oddity that DOS on FM Towns always had CD support - in fact, DOS was loaded from CD). A lot of games just booted straight off CD without ever letting DOS load. |
In fact many Towns CD-ROM booter games did not contain DOS. There is a ROM-based DOS with a custom GUI called TownsOS built into FM Towns firmware, that process CD-ROM booting and NVRAM settings. |
Here's what I can do for this: I'll add the machine type and VGA mode enumerations for FM towns and a "machine" string for it as stubs. I'll add the C++ macros for it (something like IS_FMTOWNS) as well. Then I'll stub the code off so that in this branch it only triggers E_Exit() to let the user know it is unimplemented. For anyone interested in FM towns implementation, these stubs should serve as a starting point to begin implementing it in their own branch of DOSBox-X. |
MAME runs most towns software.
Other than it has an x86 cpu and runs dos, completely different. |
The latest commit has machine=fm_towns added as well as the MCH_ machine enum and M_ video mode enum to implement it. If anyone wants to add it to DOSBox-X, feel free to fork the codebase and have fun! |
I mean the stub code and settings are there for future support of FM Towns in DOSBox-X. Anyone interested in adding FM towns emulation is welcome to fork this project and do it. The addition is there to help start the process by adding the machine type and machine= setting for you. As I stated in the README, adding a third platform beyond IBM PC and NEC PC-98 might make the codebase unmanageable, so I personally will not be adding FM towns support. Having separate parallel projects each focus on one platform or multiple similar platforms would be better than cramming all emulation into one project. Supporting and testing three platforms might spread my attention too thin to properly maintain emulation and support of the code. |
Following up on the previous comment, I also do not mind at all if the FM towns fork deviates from this project, just as DOSBox-X has deviated from the main DOSBox project. Deviation is expected when there is the need to implement a new platform, and possibly remove the IBM PC/NEC PC-98 mode doing so to keep the code manageable. |
If your fork is successful to some degree, you may also want to announce it on the vogons.org forums. They might appreciate it. |
This reminds me, I wonder if PC-98 should also be forked away into its own project. I mean, seriously, in practice there isn't much in common with IBM PC, even when it comes to simple things you'd expect to be somewhat similar (e.g. text output over DOS functions) it seems to have little in common because software has wildly different expectations. |
Actually, thinking some more about it, I wonder if taking that route would end up leading to a skeleton DOSBox framework that acts as frontend for the different emulation cores. |
@sikthehedgehog That is a neat idea: A core DOSBox-X framework that compiles against IBM PC, PC-98, etc. The trick is how to take the existing code and separate it out like that. Despite the major differences in platform, IBM PC and PC-98 do have some chipsets in common though. They both the same Intel interrupt, timer, and DMA controllers. They only differ in what clock frequency they are given by the motherboard. They both (as far as I can tell right now) use the same NEC floppy controller chipset. The connection and pinout is different and the floppy drives use a slightly different RPM from IBM though. Even though PC-98 initially used the 8251 for the serial port, later models are said to add a second serial port that uses the same 16550 UART as the IBM PC. PC-9821 systems since about 1993 use the same IDE interface to the hard drive as IBM PC, and later systems shipped with a CD-ROM connected to IDE. I found through poking around that the I/O ports related to PCI and the Intel PCI chipsets generally work the same on PC-98 as they do on IBM PC. The mouse connects through an intel 8255 which the original IBM PC 5150 used to connect the keyboard and the DIP switches. However the biggest common code to tackle is the DOS kernel emulation. Both IBM and NEC licensed MS-DOS and adapted it to their platform. That includes the freedom to modify the DOS kernel as needed. So it's not clear how to make that common code work. The new modular DOSBox-X should fork into it's own repository so that work can be done to separate it out for that purpose (with possible breakage in the process) while leaving this DOSBox-X project stable with bug fixes so the existing user base can use it undisturbed. I propose "DOSBox-XM" for modular. However this is also a chance to choose a different name than "DOSBox-X" if we can agree on a better one. I could also have the sister project DOSLIB assist in testing by writing various DOS programs that do something and then check to see that the hardware/BIOS/DOS call responded in an expected way. That would be code that would work on both real hardware and DOSBox-X. A test suite could be made out of that. |
Point. I was thinking more on the bugs caused by the early PC-98 games and it didn't hit me that later models may have been closer to IBM PC - in hindsight, DOS/V probably had a lot to do with it as well. PC-98 DOS has the weird quirk of text overlaying graphics, guaranteed ANSI escape code support (including a few custom codes) and the bar at the bottom. The obvious stuff to split out would be the interface (which remains more or less the same across all platforms), but yeah not sure how to handle the other stuff that can be shared. I know MAME splits individual components (each chip, etc.) into its own emulation cores and then a "machine" is set up indicating which components it contains. In fact I'm not sure how much DOSBox-X differs from that already. |
@sikthehedgehog I've learned that ANSI support is literally built into the DOS kernel on PC-98 with a function key taking the bottom row. ANSI codes are available to hide/show that row. There's a strange unknown INT DCh interrupt call that's a direct line to the CON driver. I can't find anything on it except the "extensions" to the base calls, but as far as I can tell, one of the calls allows changing the function key row. The PC-98 video hardware could be thought of as two NEC video outputs genlocked together (text being the sync source and graphics following along), and then when combined, text overlays graphics. EDIT: By built in I mean that if you trace INT DCh or calls to the console driver in the DOSBox-X debugger after booting a PC-98 MS-DOS boot disk, you'll see the code that handles ANSI at segment 60h, which is deep within the DOS kernel. |
If I have time this fall I might try to acquire some FM towns hardware. Any suggestions for model, type, etc for me to test and develop against? Understand that, just like the PC-98 development in 2017, support was added by first getting programs designed for it to run, then getting basic code from DOSLIB to run on it, then gradually getting a handle on the hardware before finally adding support to DOSBox-X. Just like PC-98, support will appear as follows:
This is the process that was used to add PC-98 emulation back in 2017 and I'll repeat it for FM towns emulation. As always, help is appreciated with this project. I won't be able to do much this summer as my professional work is taking up most of my time right now. |
I do have some time though to answer questions if anyone needs help modifying DOSBox-X or DOSLIB. |
I suggest purchasing an FM-TOWNS II ME20. It has a relatively long-lasting and maintainable CD-ROM drive (Most FM-TOWNS software and games are only released on CD-ROM), compatible with conventional IBM PC SIMM sticks. |
I stand corrected, according to this article, FM Towns boots from DOS in ROM with MSCDEX.EXE and then loads bootable code from CD-ROM. Perhaps instead of a "switch to FM Towns" command the mode change should begin in the BOOT command instead. I propose something like "boot game.iso --fm-towns" |
In the meantime I do have ONE PDF file up on Hackipedia about FM Towns that I've found so far: |
As always, links to PDFs, documentation, manuals, etc. related to FM Towns is welcome. |
for a record, many FM Towns game CDs are in mixed mode (i.e. audio tracks comes after data track) and many games also tries to detect and play audio tracks. so instead of |
and it is worth to mention there was a hack on top of bochs emulator turning it into FM Towns emulator: https://web.archive.org/web/20051214222524/http://fmbochs.emuvibes.com/ |
as a side note, Fujitsu made IBM PC/AT compatibles with FM Towns compatibility mode (which is a PCI addon card with additional pins to CPU) switch (i.e. FMV-Towns). in original FMV-Towns, they have physical switch for switching between DOS/V(i.e. IBM PC/AT) mode and TOWNS mode. people decided to make physical hacks on normal PC motherboards for connecting additional pins on TOWNS card, and wrote a soft switching program called |
for reference: https://github.com/mamedev/mame/blob/master/src/mame/drivers/fmtowns.cpp |
I see that. I was eventually able to find an online collection of FM towns CD-ROM images. One image I examined had a BIN+CUE rip with 85 tracks. The first track is data. By the way in the first track there is an "IPL" structure in CD-ROM sector 0 (IPL4 something). Is that documented anywhere? |
please have a look here: https://nfggames.com/forum2/index.php?PHPSESSID=jq15qnqe1fb7jjjk8k554p0ie7&msg=38178 ( original Towns IPL Q&A found: http://web.archive.org/web/20090304154204/http://homepage3.nifty.com/vtowns/down/ipl_qa.html ) and C: drive is always the ROM drive. |
I had seen the following on facebook. To follow up on a previous post and before I really put it out into the wild I'd like to know if there are some PSU guru's out there who might be able to verify the schematics I made for the Marty Tamura PSU. Goal was to just release some accurate schematics since they don't seem to exist on the web.I didn't turn on the values layer in Eagle, but that contains as much info as I could find/measure on all the components. |
and in software side, a FOSS run386 replacement has been found: https://github.com/nabe-abk/free386 |
I saw the following on Facebook again. |
Important towns stuff Looks squirrely but this is a draft of a totally new power supply for the FM TOWNS Towers. Intent is to use a pico PSU as a plug and play device. Only thing I haven't done yet is source the precise type of connector the stock fan uses. Otherwise I can just put two headers where you can rip the connector from old PSU that always dies. |
BIG NEWS! There has been a change in the replacement SCSI CD-ROM software which has made a single boot floppy work with like 99% of all software on FM-TOWNS! https://www.facebook.com/100000456331612/videos/4689507231074442 |
Friends, this is the heart of my UX20. The CPU. |
Long post but I hope this can help other PC owners. |
Ok so Ben R and I have been trying to trouble shoot an FM TOWNS MARTY (REV 2 MOBO). The Marty outputs CD audio just fine. I can play CDs from the Dashboard and games can stream CD AUDIO just fine. But the BMG/PCM sound was non existent. If you turned up the volume of the TV to like MAX you could barely hear it.
|
Almost done. Still I have to wait for some female single pin to make the oscillator socket, since it is very hard to find the right 4 pin size for it. I am not sure what a Cyrix 486 33mhz is gonna do.... I am still digging informations about it. Maybe it works from the start, maybe I could need a bios revision, could be smock appear from the oscillator or somewhere else. |
I saw that from a post on Facebook. Working on the Towns to ATX / Pico PSU adaptor. Just have to do electrical wiring which is annoying...expect to see a live test in 3-4 weeks Yes my friend I know many of us need these adaptors. I will probably do a small run of these adaptors once the design is verified to totally work and then release the source. I've also made ground and power planes on the card. I don't think I've missed anything. I know you're busy but can you take a look at this? I believe I used your recommendations correctly. I even added 12V fan connector Your schematics looks good to me. I can't recall the FMT connector pinout, in regards to the PON and (probable) SOFF pins, but I guess you took care of confirming that. On the board layout though, I can't see the tracks for these signals going to the PIC pins? Maybe it's an artifact of the rendering. Also, are you intending on using a 90° ATX connector? I'm not sure even a pico will fit if attached vertically. Yes will use 90* connector and it will fit inside. BTW, I never heard you saying if that previous design worked ok after changing the wires. Did it work? Also the diode that we suspect could control operating system power off (pin 10 to diode to pin 23 , your orange pin on your original photo months ago) is connected but I will test it without diode installed first (open circuit) just to ensure power on and off work. Nice! I would like to also see provision for an internal 12V PSU, instead of having to use an external power brick. I used a 65W MeanWell and a PICO inside the original enclosure of my X68k, so aesthetically it looks original. And it's also less hassle when you have multiple computers (most of us do). You could install terminal blocks for connecting this kind of PSU. Inside the X68k it's a tight fit, but the tower Towns should have plenty of space for that. yes I also just purchase yesterday for my X68000 pico set I bought from Mattsoft. with the original firmware, pin2 need to be kept high, or the PIC will turn the system off after a few seconds. I'm not using the soft off feature, as I never had the time to research if that Towns pin really has this purpose. But I agree you should make pin 2 high and test everything else first. Then monitor Towns pin x (whatever it is) with an scope to see if it sends data when choosing system off on the TownsOS. Then you can be sure what signal to expect, and adjust your circuit accordingly. If I ever get working tower PSU I will do this lol |
Ok guys so I bought DX4 upgrade card for my fresh. It is not socketted as it is soldered and it's the 100mhz CPU. Speed or Beauty can’t have both. I jest of course. Good luck maybe someone can help. |
Got my pcbs for the X68k picopsu. Now will need to beg some friends to do the soldering job. C'est censé s'installer sur quelle machine? à quel endroit? plein de question en suspense... sur mon sharp X68000. Me suis trompé de groupe lol. Mais j'en ai profité pour dire que ce serait top d'avoir le même type de produits pour le FM Towns Tower. I mean for which model? I have a XVI Compact and a PRO II. Un XVI standard. I believe this PSU type would also work on an Expert as I have an Expert PSU powering one of my XVI’s. probably 😊. Got the pcb plans from https://github.com/mattsoft/X68K_Pico_PSU_v2 Someone is selling them ready to plug (without the picopsu and psu) on ebay for around 40$. But he is asking insane 40$ to ship them to France... 80 total. So I decided to make one myself. _ |
Is there any way to use the internal screen at same time output to the OSSC on a UX20 / UR20. If so, is this video card one of them? page.auctions.yahoo.co.jp |
the hardware I saw on facebook could be interesting for the FM Towns emulation. |
👍 , I'm merely an observer, but sounds like a plan if that's the eventual goal of these hardware photos! |
So I'm trying to use it with CX20 but I think the drive is dead as everytime townsOS tries to grab the drive to create OS partition it says "drive not ready". I even see the red access light stay lite up. _ |
Hello. I share here my FMV-TOWNS Model H BIOS file. |
https://github.com/akuker/RASCSI/blob/master/doc/rascsi_en.txt stated that it works for PC-98 and FM-Towns. |
by the way, there is a free FM Towns System ROM is developing: |
I have this FMV Towns PCI Card that I'm trying to figure out how to use with an ALI Chipset Socket 7 Motherboard, the board I have is the Asus-P5A |
From the facebook chats: Hi, i have 3 PCB (thanks to Cyo.the.vile Gerber) to remplace the FMT2 PSU. Done on 2 of mine and it works great. 15€ each. https://townsworld.com/2021/05/08/fm-towns-tower-power-supply-assembly-guide/?fbclid=IwAR2WdJ7DtqU1g97tDGpA4ALb6IxaRmM7VbDtGZVva4eLRlGg0sbl7K5hBis |
Here is a new FM TOWNS / Marty Emulator project which might be interesting for the dosbox-x. |
Maybe a future TODO item. Or at least a placeholder issue for the topic.
FM Towns is another series of Japanese x86 non pc-compatible computers.
https://en.wikipedia.org/wiki/FM_Towns
The text was updated successfully, but these errors were encountered: