Open Jarvik7 opened 6 years ago
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. FM-Towns had an internal graphics system that supports graphic modes upto 1024*512 or 32768 colors, multiple graphics layers with different resolutions, even with sprite support. The graphics architecture is much like an arcade or game console and far stronger than PC-98's.
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.
Any documentation on the platform?
If you're willing to cope with Japanese and with a tad of tables: http://retrocdn.net/File:FM_TOWNS_JP_Technical_Data_Book.pdf
No, seriously, the amount of detail it goes into is ridiculous 0_0
In what way is it different from IBM PC or NEC PC-98?
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.
I don't have any documentation, but MAME already supports FM Towns I believe.
MAME runs most towns software.
In what way is it different from IBM PC or NEC PC-98?
Other than it has an x86 cpu and runs dos, completely different.
The latest commit has machine=fmtowns 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.
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.
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.
I propose something like "boot game.iso --fm-towns"
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 boot
ing a regular ISO file, bin+cue or even mdf+mds or img+ccd or nrg support may also needed.
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/
Perhaps instead of a "switch to FM Towns" command the mode change should begin in the BOOT command instead.
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 vtowns.com
. details in Japanese: http://mujirushi.org/vtowns/index.html
MAME already supports FM Towns I believe
for reference: https://github.com/mamedev/mame/blob/master/src/mame/drivers/fmtowns.cpp
I propose something like "boot game.iso --fm-towns"
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
boot
ing a regular ISO file, bin+cue or even mdf+mds or img+ccd or nrg support may also needed.
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?
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 there is some document inside IPL151.LZH archive.
( 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. J1 is where you put either a 20 or 24 pin pico PSU. J2 is the high speed density connector that everyone thinks is proprietary. Ill try to finish this today and potentially send to fabrication by end of day but no guarantee. I'm an amateur after all and even forgot to ground the PIC in the photo 🙂
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! This is a video of FD BOOT by captainys which is a floppy image you write to a floppy and stick in your FMT. Once the PC boots from the floppy disk it will load a program which searches for scsi cd-rom drives starting from ID6 and going backwards. Once the software finds a drive it then boots into it and will work as if it were a normal cd-rom boot. No more need for TOS 1.1/2.1/DOS boot floppies, one to rule (most) programs! You can find the image at https://github.com/.../master/TOWNS/IPL/DISKIMG/FDIMAGE.BIN if you would like to give it a try. Let me know if you have any questions it seems to be working quite well!
https://www.facebook.com/100000456331612/videos/4689507231074442
Friends, this is the heart of my UX20. The CPU. Next week I will have capacitor set to retrofit entire computer and future-proof it! However I am curious. I know some people have taken this SX CPU out if their computer and also Marty and placed a 486SX CPU in their computer. I am curious if this is going to break compatibility with games or not. My long term goal is to possibly have just the UX20 with a 486 inside it and a desktop (Maybe a Fresh) physically underneath the UX20 also using it as a monitor. So the software doesn't run in UX20? Then try on the more powerful desktop. That's the idea. However as I asked recently I am curious if a faster computer will break old software or games. Please share your thoughts. I know Deunan and one other person have removed their 386 from their Marty and installed 486@ 50mhz in same QLP package and had slight boost in performance
Long post but I hope this can help other PC owners. Friends I have made this PCB in kiCad and sent to fabrication. This is my first PCB I have ever designed and sent to be fabricated. This device is used to plug into a GOTEK with flash floppy firmware and you simply slide it back into original floppy cradle and it is plug and play. You will have to use two jumper wire on two pin header on the right or even solder wire if you want. Both of my floppy on my 20F are dead and UX20 have problems reading floppy so I will retrofit both PC with goteks. I will keep you informed if this is a good fit. I have a feeling I will have to go through 1 more PCB modification despite measuring carefully with calipers. Once it is completed I will tell you 🙂 Now for my next question. I am improving at electronic circuit design. Perhaps the largest problem we have is the PSU problem with tower models. I don't know how profound the issue is with desktops. All-in-ones.... Are a dice-roll. So what I am asking is if people would like me to make an attempt at a converter board for the tower models. Specifically use either ATX or Pico PSU as plug and play. I have not heard of anyone using a Pico inside a towns computer but I am thinking it is possible. The downside to this is I think you lose the ability to plug your monitor into the plug in the back of the computer. The plus side is that pico and the bricks are significantly cheaper and VERY easy to assemble for anybody! My only concern is finding the 44 pin PSU female plug on mouser or digikey. This is what would make this moderately difficult to pull off. Please give me your input.
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.
So here are the troubleshooting steps taken so far.
It is a lot to read - so please be patent,.
This audio issue was on a stock board, so first thing I did was a Full cap replacement. Nothing changed.. so not the caps/
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. Fingers crossed.
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. And isn't it possible to modify your previous prototype to make the current connections, so you can confirm it before sending the design to the manufacturer? Would be more reliable.
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. Then I will install it provided PSU works and try to shut down towns OS. I never got back to the perf board setup as other things got in the way. Primarily ran out of wire and solder at one point
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. This is the one I used: https://www.meanwell-web.com/.../ac-dc-single-output-open... BTW, my CX-20 is rated at 70W nominal (90W peak). I guess unless a system is really expanded (has all the expansion slots populated and a mechanical HD installed), 65W is plenty of power.
yes I also just purchase yesterday for my X68000 pico set I bought from Mattsoft. I will keep that possibility in mind but trying to reduce BOM as much as possible for this revision. Next revision I might try this so can also use 100V port still on a power supply
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 I'll send this to fabrication today. Thank you so much for your help
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. However the card is too tall for me to close the lid. This looks like it is meant for the desktops with 4 slot in the back as mine has 3 slots. Is it generally difficult to find a shorter card with 3.3 regulator on it?
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. But we have a lockdown here in France. Need to be patient. Wish I could find the same product for my FM Towns tower. Edit: oopps. Thought I posted this in the X68k fan club group 😅. Oh well...
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. Benjamin, plus haut est en train de bosser sur le sujet. Faut patienter. _
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 mattsoft/X68K_Pico_PSU_v2 GITHUB.COM mattsoft/X68K_Pico_PSU_v2 mattsoft/X68K_Pico_PSUv2
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.
_ That’s so cool that they makes these boards now. I remember trying to repair my XVI board and to no avail...
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 FR1/27 ハイレゾリューションWindows アクセラレ... - ヤフオク!
@kcgen Maybe. It sounds like @RNMB15 is discussing how to set his up so that it can be used as reference to develop DOSBox-X FM towns mode.
the hardware I saw on facebook could be interesting for the FM Towns emulation.
@kcgen Maybe. It sounds like @RNMB15 is discussing how to set his up so that it can be used as reference to develop DOSBox-X FM towns mode.
the hardware I saw on facebook could be interesting for the FM Towns emulation.
:+1: , I'm merely an observer, but sounds like a plan if that's the eventual goal of these hardware photos! Thanks for clarifying @RNMB15 and your nod as well @joncampbell123 :-)
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. So I'm considering a journey on retrofitting this with another scsi2sd. Then I can finally have hard drive for UX20. Has anyone else done something similar to this? By the way, the inside of this device has nothing special. Only 100V PSU and direct cable. It should theoretically be possible to make a 50 pin SCSI port cable directly to a 50 pin hard drive / hard drive emulator.
I have like a couple of REALLY old 20/40MB hard drives with like centronics cable, I think they are SCSI or SASI...I will get around to trying them out someday... I always bought 20-100MB SCSI HDDs from ebay. As long they where healthy, they all worked for my Towns Computers. _ Nicklas Elrinth Holmgren is there any difference between fm towns scsi and x68000 scsi devices? should be able to use the http://retropc.net/gimons/rascsi/ ?
is there any difference between fm towns scsi and x68000 scsi devices? should be able to use the http://retropc.net/gimons/rascsi/ ?
https://github.com/akuker/RASCSI/blob/master/doc/rascsi_en.txt stated that it works for PC-98 and FM-Towns.
i saw it on a facebook chat.
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