Previous Thread
Next Thread
Print Thread
Page 5 of 5 1 2 3 4 5
Re: Fairlight CMI [Re: SynaMax] #113950
09/17/18 11:47 PM
09/17/18 11:47 PM
Joined: Nov 2017
Posts: 27
S
SynaMax Offline OP
Member
SynaMax  Offline OP
Member
S
Joined: Nov 2017
Posts: 27
Considering the fact that the real hardware can boot into the OS without channel cards tells me that disabling any channel card emulation should help with debugging the boot issue. If the emulation continues to crash without any channel cards "connected", then that would determine that the issue is not with the channel cards but rather the main CPUs. Anyone willing to test this out?

Re: Fairlight CMI [Re: SynaMax] #114222
11/10/18 02:17 AM
11/10/18 02:17 AM
Joined: Nov 2017
Posts: 27
S
SynaMax Offline OP
Member
SynaMax  Offline OP
Member
S
Joined: Nov 2017
Posts: 27
So I finally got around to digging through MAME's source code and seeing if I can get the OS to boot. After some initial trial and error, I commented out the PICUs out of the address map structure and noticed a slight difference. I noticed that they were not in the memory map for MESS's emulation, so by removing the PICUs for CPU 1 and 2 (located at addresses $FCFC and $FCFD respectively), I got the video to start drawing the "LOADING SYSTEM" text to the top of the screen after boot up (if you watch the machine boot up in slow-motion, this is a good sign).

Furthermore, I decided to comment out the channel cards in the address map structure in addition to the PICUs and I actually got the final start-of-execution address ($1C31) for the OS to load in $FE01. Unfortunately, the OS did not boot up, instead, it just drew bunches of 6s on the screen in an endless loop.

Re: Fairlight CMI [Re: SynaMax] #114381
12/02/18 06:47 PM
12/02/18 06:47 PM
Joined: Dec 2018
Posts: 2
T
Tonhar Offline
Member
Tonhar  Offline
Member
T
Joined: Dec 2018
Posts: 2
Hi SynaMax,

I'd like to offer to my services, I'm an engineer who has been writing emulation software for over 20 years, I did write my own Fairlight emu, but I got about 80% through, I had the same problem as you, CMI system wouldn't boot,
mainly because the memory management was not complete, the system has a really complex memory system, and the FUSE reg / PICU's was hard to test.

So if you can support me to get the code compiling, I be happy to help.




Last edited by Tonhar; 12/02/18 07:13 PM.
Re: Fairlight CMI [Re: SynaMax] #114383
12/02/18 06:59 PM
12/02/18 06:59 PM
Joined: Dec 2018
Posts: 2
T
Tonhar Offline
Member
Tonhar  Offline
Member
T
Joined: Dec 2018
Posts: 2
BTW, 0x1C31 is code in the CMI.SY binary, sounds like a paging error, like the interrupt is not cleared, then a second interrupt is thrown.

I dont know if you have this, here are the code start positions for SYS19IIX.IMD:

-rw---c- 3864 cmidos.sy (2 Image) Load=$0100, Jump=$0e5b Sect 24
-rw---c- 82560 lbfile.sy (0 User defined)
-rw---c- 2672 tover0.ov (2 Image) Load=$a410, Jump=$a410 Sect 1908
-rw---c- 4248 poverw.ov (2 Image) Load=$9010, Jump=$9010 Sect 2048
-rw---c- 5128 pover6.ov (2 Image) Load=$9010, Jump=$9010 Sect 724
-rw---c- 1960 page5.dp (2 Image) Load=$8000, Jump=$8000 Sect 1932
-rw---c- 1328 paged.dp (2 Image) Load=$8000, Jump=$8000 Sect 2192
-rw---c- 3976 pages.dp (2 Image) Load=$8000, Jump=$8000 Sect 2540
-rw---c- 14592 page3.hl (0 User defined)
-rw---c- 4064 pagel.dp (2 Image) Load=$8000, Jump=$8000 Sect 900
-rw---c- 4096 page6.dp (2 Image) Load=$8000, Jump=$8000 Sect 1972
-rw---c- 5104 pover9.ov (2 Image) Load=$9010, Jump=$9010 Sect 2120
-rw---c- 5016 pover8.ov (2 Image) Load=$9010, Jump=$9010 Sect 2348
-rw---c- 2696 paget.dp (2 Image) Load=$8000, Jump=$8000 Sect 2576
-rw---c- 13952 page4.hl (0 User defined)
-rw---c- 26240 pager.hl (0 User defined)
-rw---c- 34016 cmi.sy (2 Image) Load=$0f00, Jump=$2000 Sect 56
-rw---c- 2288 tover2.ov (2 Image) Load=$a410, Jump=$a410 Sect 1952
-rw---c- 6784 prover1.sy (2 Image) Load=$a400, Jump=$a410 Sect 2484
-rw---c- 1048 tover1.ov (2 Image) Load=$a410, Jump=$a410 Sect 1744
-rw---c- 3856 page7.dp (2 Image) Load=$8000, Jump=$8000 Sect 1840
-rw---c- 3096 pagef.dp (2 Image) Load=$8000, Jump=$8000 Sect 2240
-rw---c- 5096 poverh.ov (2 Image) Load=$9008, Jump=$9010 Sect 2608
-rw---c- 5376 page5.hl (0 User defined)
-rw---c- 4096 paged.hl (0 User defined)
-rw---c- 5376 pages.hl (0 User defined)
-rw---c- 4992 pagel.hl (0 User defined)
-rw---c- 3232 page8.dp (2 Image) Load=$8000, Jump=$8000 Sect 2164
-rw---c- 448 pageg.dp (2 Image) Load=$8000, Jump=$8000 Sect 2600
-rw---c- 20352 page6.hl (0 User defined)
-rw---c- 10808 midi.lo (2 Image) Load=$4000, Jump=$4000 Sect 456
-rw---c- 16384 scratch.sy (0 User defined)
-rw---c- 18816 page7.hl (0 User defined)
-rw---c- 5760 pagef.hl (0 User defined)
-rw---c- 5368 cmierr.sy (2 Image) Load=$0000, Jump=$0000 Sect 1796
-rw---c- 4984 pover3.ov (2 Image) Load=$9010, Jump=$9010 Sect 2008
-rw---c- 1792 page1.dp (2 Image) Load=$8000, Jump=$8000 Sect 544
-rw---c- 3640 pagec.dp (2 Image) Load=$8000, Jump=$8000 Sect 560
-rw---c- 8112 pover4.ov (2 Image) Load=$9010, Jump=$9010 Sect 592
-rw---c- 5080 pover0.ov (2 Image) Load=$9010, Jump=$9010 Sect 1664
-rw---c- 4032 page4.dp (2 Image) Load=$8000, Jump=$8000 Sect 1872
-rw---c- 4016 page9.dp (2 Image) Load=$8000, Jump=$8000 Sect 2084
-rw---c- 4072 pager.dp (2 Image) Load=$8000, Jump=$8000 Sect 2304
-rw---c- 768 prgrom.sy (2 Image) Load=$7d00, Jump=$7d00 Sect 2340
-rw---c- 16384 aic09.lo (2 Image) Load=$4000, Jump=$4000 Sect 324
-rw---c- 11008 page2.hl (0 User defined)
-rw---c- 7424 page8.hl (0 User defined)
-rw---c- 7936 pagei.hl (0 User defined)
-rw---c- 5080 pover2.ov (2 Image) Load=$9010, Jump=$9010 Sect 1584
-rw---c- 6800 prover0.sy (2 Image) Load=$a400, Jump=$a410 Sect 2428
-rw---c- 4064 page2.dp (2 Image) Load=$8000, Jump=$823b Sect 1628
-rw---c- 4272 pagea.dp (2 Image) Load=$8000, Jump=$8000 Sect 2204
-rw---c- 4096 pagei.dp (2 Image) Load=$8000, Jump=$8000 Sect 2268
-rw---c- 7808 pover5.ov (2 Image) Load=$9010, Jump=$9010 Sect 660
-rw---c- 4488 pover1.ov (2 Image) Load=$9010, Jump=$9010 Sect 1756
-rw---c- 4056 pover7.ov (2 Image) Load=$9010, Jump=$9010 Sect 2392
-rw---c- 4048 page3.dp (2 Image) Load=$8000, Jump=$8000 Sect 1708
-rw---c- 8448 page1.hl (0 User defined)
-rw---c- 14336 page9.hl (0 User defined)

Last edited by Tonhar; 12/02/18 07:07 PM.
Re: Fairlight CMI [Re: SynaMax] #114384
12/02/18 08:32 PM
12/02/18 08:32 PM
Joined: May 2009
Posts: 1,747
J
Just Desserts Offline
Very Senior Member
Just Desserts  Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,747
Hi Tonhar,

MAME is reasonably easy to get compiling. The first step is to pop over to https://github.com/mamedev/mame and do a git clone of the repository.

Next, swing by https://mamedev.org and pull up the documentation regarding the prerequisites for compiling MAME on your platform of choice.

Once you have that sorted, do a single-driver build of MAME by using the following invocation:

make SUBTARGET=cmi SOURCES=src/mame/drivers/cmi2x.cpp

If you have a multi-core system, you can greatly speed up the process by adding -jX, where X is the number of cores you have or the number of gigabytes of RAM that you have, whichever is less.

Assuming you're on a 64-bit system, the resulting binary will be named cmi64, and can be invoked from the command line on Windows or from a terminal on Linux or macOS with the following additional parameters:

cmi2x -flop1 [path to the first IMD] -flop2 [path to the second IMD]

Since you're most likely going to want to debug the running machine, it is also advised to add the parameters:

-window -debug -log

MAME's debugger is reasonably fully-featured. You can switch which CPU you're focusing on using "focus N", where N is 0 or 1 for the 6809s, and higher for the keyboard MCUs. You can set execution breakpoints using "bp [address in hex]". You can set data breakpoints using "wp [address in hex],[length],[r/w]". I might have the second and third parameters swapped, it's advisable to use the debugger's built-in help functionality to learn more.

If you have any questions, feel free to pop by #mame-dev on the Freenode IRC network. When I'm not sleeping, commuting, or at work, I'm checking IRC, GMT+01. Alternatively, feel free to give me a shout on Twitter at @TheMogMiner.

Good luck!

Re: Fairlight CMI [Re: Tonhar] #114385
12/03/18 07:09 AM
12/03/18 07:09 AM
Joined: Nov 2017
Posts: 27
S
SynaMax Offline OP
Member
SynaMax  Offline OP
Member
S
Joined: Nov 2017
Posts: 27
Originally Posted by Tonhar
Hi SynaMax,

I'd like to offer to my services, I'm an engineer who has been writing emulation software for over 20 years, I did write my own Fairlight emu, but I got about 80% through, I had the same problem as you, CMI system wouldn't boot,
mainly because the memory management was not complete, the system has a really complex memory system, and the FUSE reg / PICU's was hard to test.

So if you can support me to get the code compiling, I be happy to help.





Hi Tonhar! I'll be more than happy to help compile your code! I totally agree, the memory management is a mess and I do believe we're dealing with interrupt issues with the PICUs. Thanks for sharing the code start positions!

Re: Fairlight CMI [Re: SynaMax] #114386
12/03/18 07:11 AM
12/03/18 07:11 AM
Joined: May 2009
Posts: 1,747
J
Just Desserts Offline
Very Senior Member
Just Desserts  Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,747
Originally Posted by SynaMax
Hi Tonhar! I'll be more than happy to help compile your code!


Pretty sure my post covered all that, but the more the merrier. smile

Same goes for you, too, by all means feel free to drop by the #mame-dev IRC channel on Freenode, it's a bit livelier than these forums.

Edit: Additionally, it's been a few years since I looked at the driver, but I seem to recall that the PICUs weren't in the memory map because they were installed into the memory map manually in the original driver. It would definitely be worth your time to stop by on IRC and getting assistance from people more familiar with MAME's codebase, as it beats taking random shots in the dark.

Re: Fairlight CMI [Re: SynaMax] #114387
12/03/18 02:40 PM
12/03/18 02:40 PM
Joined: Nov 2017
Posts: 27
S
SynaMax Offline OP
Member
SynaMax  Offline OP
Member
S
Joined: Nov 2017
Posts: 27
Thanks, I'll definitely check the IRC channel out!

Re: Fairlight CMI [Re: SynaMax] #114388
12/03/18 03:15 PM
12/03/18 03:15 PM
Joined: May 2009
Posts: 1,747
J
Just Desserts Offline
Very Senior Member
Just Desserts  Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,747
Cool. smile

For what it's worth, it's usually fairly dead during working hours in the EU, as that's where a large number of users are. It tends to get a bit livelier towards the late evening.

Page 5 of 5 1 2 3 4 5

Who's Online Now
1 registered members (robcfg), 116 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,606
Posts112,516
Members4,827
Most Online296
Dec 5th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.036s Queries: 15 (0.020s) Memory: 5.7181 MB (Peak: 5.9338 MB) Zlib enabled. Server Time: 2018-12-16 10:07:55 UTC