MiSTer PCXT

kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: MiSTer PCXT

Unread post by kitune-san »

kitune-san wrote: Tue Aug 23, 2022 2:28 pm I noticed during the process of working on it that it needs some more improvement for stable operation.
Freeze occurs during disk read.

The image is when trying to read FreeDOS x86BOOT.img.

2022-08-23 232256.png

I will create a temporary branch.
Please help!
The code before the rebase was saved in the following branch

Notes.
Please set the FDD disk every time after reset. If not, the drive does not seem to recognize it.

https://github.com/kitune-san/PCXT_MiSTer/tree/fdd-work
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

kitune-san wrote: Tue Aug 23, 2022 2:55 pm
kitune-san wrote: Tue Aug 23, 2022 2:28 pm I noticed during the process of working on it that it needs some more improvement for stable operation.
Freeze occurs during disk read.

The image is when trying to read FreeDOS x86BOOT.img.

2022-08-23 232256.png

I will create a temporary branch.
Please help!
The code before the rebase was saved in the following branch

Notes.
Please set the FDD disk every time after reset. If not, the drive does not seem to recognize it.

https://github.com/kitune-san/PCXT_MiSTer/tree/fdd-work
Perfect, thanks, as soon as I can I will check it and see how to organise it initially.
kitune-san
Top Contributor
Posts: 401
Joined: Wed May 18, 2022 11:20 am
Has thanked: 127 times
Been thanked: 412 times

Re: MiSTer PCXT

Unread post by kitune-san »

I noticed a large number of timing constraint violations with the floppy drive.
Tomorrow I will focus on this.
2022-08-24 001505.png
2022-08-24 001505.png (70.96 KiB) Viewed 13226 times
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: MiSTer PCXT

Unread post by Caldor »

So much progress :) Nice to see. I will experiment some more tomorrow.
MicroCoreLabs
Core Developer
Posts: 96
Joined: Sun Jun 05, 2022 6:12 pm
Location: California
Has thanked: 6 times
Been thanked: 86 times
Contact:

Re: MiSTer PCXT

Unread post by MicroCoreLabs »

I believe you that the UART flow control signals are connected, but I wonder if they are enabled on the host side. They may default to disabled. One easy check is to see if they toggle using SignalTap.
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

MicroCoreLabs wrote: Wed Aug 24, 2022 6:07 am I believe you that the UART flow control signals are connected, but I wonder if they are enabled on the host side. They may default to disabled. One easy check is to see if they toggle using SignalTap.
You're right, I'll try to find out.
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

kitune-san wrote: Tue Aug 23, 2022 3:17 pm I noticed a large number of timing constraint violations with the floppy drive.
Tomorrow I will focus on this.

2022-08-24 001505.png
I have to make reorganisations in the code before including this progress, please keep moving forward in getting stability from your branch, and we'll merge it later.

Thank you!
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: MiSTer PCXT

Unread post by Malor »

pgimeno wrote: Fri Aug 19, 2022 4:24 pm That's weird. Has this core implemented something like an A20 gate or an HMA area?
The 8086/8088 had neither function. The HMA was created by a bug in the 80286, and the A20 line implemented a workaround to toggle it on and off, because a lot of DOS software broke when it was enabled.

It's one of the best hardware bugs ever. Free almost-64K was kind of a big deal. It was so useful that all later x86 chips preserved the behavior.
User avatar
NightShadowPT
Posts: 224
Joined: Mon May 25, 2020 9:56 am
Has thanked: 5 times
Been thanked: 12 times

Re: MiSTer PCXT

Unread post by NightShadowPT »

Good to see this core released!

Great job!

Is there any equivalent to the eXo/Flynn Top 300 DOS Pack for this core? (focusing on 8086 games)
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 497 times
Been thanked: 467 times

Re: MiSTer PCXT

Unread post by akeley »

NightShadowPT wrote: Wed Aug 24, 2022 6:49 pm Is there any equivalent to the eXo/Flynn Top 300 DOS Pack for this core? (focusing on 8086 games)
https://archive.org/details/tdl-hdd

This is a different concept than the curated & tested stuff flynnsbit's doing (I believe his PCXT dedicated pack will apppear at some point too), but maybe somebody will find it useful too. It worked pretty well when I tested it, albeit a bit slow to boot. But I was using the old core releases, perhaps the new turbo versions have the boot speeds improved.

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

kitune-san wrote: Tue Aug 23, 2022 2:55 pm The code before the rebase was saved in the following branch

Notes.
Please set the FDD disk every time after reset. If not, the drive does not seem to recognize it.

https://github.com/kitune-san/PCXT_MiSTer/tree/fdd-work
I have adapted Main and merge your branch with the latest release, however it doesn't seem to work, can you take a look at it in case I missed something at core level?:

https://github.com/MiSTer-devel/PCXT_Mi ... elease-fdd

Below, I also provide the changes made in Main, which are basically a collection and adaptation of the AO486 project for PCXT:

https://github.com/spark2k06/Main_MiSTe ... 4ccdd76de7

I attach the Main and RBF binaries as well.


It's possible that the Main is badly adapted, I'll check it well, but just in case, if you can confirm me that the core merge is correct, we'll move forward :)
Attachments
PCXT - PRERELEASE.zip
(1.15 MiB) Downloaded 145 times
MiSTerMain - PRERELEASE.zip
(552.04 KiB) Downloaded 202 times
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

I've tried changing the OSD menu text to AO486 and now it passes the diagnostic ROM tests, so the problem is definitely in the Main adaptation, I'll check it out.

However, @kitune-san, the improvements you make, please be from the prerelease branch that would already be ready (for the moment change the text to AO486 for your tests):

https://github.com/MiSTer-devel/PCXT_Mi ... elease-fdd
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

MicroCoreLabs wrote: Wed Aug 24, 2022 6:07 am I believe you that the UART flow control signals are connected, but I wonder if they are enabled on the host side. They may default to disabled. One easy check is to see if they toggle using SignalTap.
You were right, only the RX/TX lines seem to be working... now it's time to find out how to activate them. This is the code used for communication with serdrive:

If anyone has any clues...

Code: Select all

	char ComPortBuff[20];
	sprintf(ComPortBuff, "/dev/ttyS1");
	const char* ComPort = NULL;
	ComPort = &ComPortBuff[0];
	...
	serial.Connect(ComPort, baudRate);	
	processRequests(&serial, images[0], images[1], timeoutEnabled, verbose);

Code: Select all

class SerialAccess
{
public:
	void Connect( const char *name, struct baudRate *p_baudRate )
	{
//		char buff1[20], buff2[1024];

		baudRate = p_baudRate;

		pipe = -1;

		if( !access(name, R_OK | W_OK) )
		{
			struct termios state;
			  
			log( 0, "Opening %s (%s baud)", name, baudRate->display );

			pipe = open(name, O_RDWR);
			if( pipe < 0 )
				log( -1, "Could not Open \"%s\"", name );

			tcgetattr(pipe, &state);
			cfmakeraw(&state);
			state.c_cflag |= CRTSCTS | CLOCAL;
			state.c_lflag &= ~ECHO;
			cfsetispeed(&state, baudRate->speed);
			cfsetospeed(&state, baudRate->speed);
			tcsetattr(pipe, TCSAFLUSH, &state);
		}
		else
			log( -1, "Serial port '%s' not found", name );
	}

	void Disconnect()
	{
		if( pipe )
		{
			close( pipe );
			pipe = -1;
		}
	}

	unsigned long readCharacters( void *buff, unsigned long len )
	{
		long readLen;
//		int ret;

		readLen = read(pipe, buff, len);

		if( readLen < 0 )
			log( -1, "read serial failed (error code %i)", errno );

		return( readLen );
	}

	int writeCharacters( void *buff, unsigned long len )
	{
		long writeLen;
//		int ret;

		writeLen = write(pipe, buff, len);

		if( writeLen < 0 )
			log( -1, "write serial failed (error code %i)", errno );

		return( 1 );
	}

	SerialAccess()
	{
		pipe = 0;
		speedEmulation = 0;
		resetConnection = 0;
		baudRate = NULL;
	}

	~SerialAccess()
	{
		Disconnect();
	}

	int speedEmulation;
	int resetConnection;

	struct baudRate *baudRate;

private:
	int pipe;
};
MicroCoreLabs
Core Developer
Posts: 96
Joined: Sun Jun 05, 2022 6:12 pm
Location: California
Has thanked: 6 times
Been thanked: 86 times
Contact:

Re: MiSTer PCXT

Unread post by MicroCoreLabs »

I believe the UART flow control needs to be enabled in the Cyclone-V SOC configuration inside of the HPS. I recall reading that it is disabled by default, and they seems to be what you see.

Actually, is there no activity in either direction? Maybe your core is also not using flow control on your UART.

Once you fix this, you should able to run at megabit speeds on the UART. :)
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

MicroCoreLabs wrote: Thu Aug 25, 2022 5:57 pm I believe the UART flow control needs to be enabled in the Cyclone-V SOC configuration inside of the HPS. I recall reading that it is disabled by default, and they seems to be what you see.

Actually, is there no activity in either direction? Maybe your core is also not using flow control on your UART.

Once you fix this, you should able to run at megabit speeds on the UART. :)
I set a trigger on all signals... and if I did it right, it only detected the level change on RX/TX.

Thanks for the heads up, now it's time to pull the thread and find out how to enable it.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: MiSTer PCXT

Unread post by Caldor »

I made a floppy boot disk for the PCXT core. Its a mix of different things. Sets up a RAM drive, EMS, high mem, 4DOS and Volkov Commander. A clone of Norton Commander that is coded entirely in assembly so its has a very small footprint. Ends up with 610kb mem free.
http://dionysus.dk/devstuff/mister/PCXT ... Floppy.img
Mills
Posts: 90
Joined: Mon Jun 08, 2020 2:52 pm
Has thanked: 15 times
Been thanked: 32 times

Re: MiSTer PCXT

Unread post by Mills »

NightShadowPT wrote: Wed Aug 24, 2022 6:49 pm Good to see this core released!

Great job!

Is there any equivalent to the eXo/Flynn Top 300 DOS Pack for this core? (focusing on 8086 games)
I don't know if that's a good idea for 8088, I am testing some file managers and they all use ram or install TSR programs that stay in ram and make things slow and glitchy, but maybe it is possible to do it.
GreyRogue
Core Developer
Posts: 17
Joined: Sun May 24, 2020 8:57 pm
Been thanked: 12 times

Re: MiSTer PCXT

Unread post by GreyRogue »

spark2k06 wrote: Thu Aug 25, 2022 6:02 pm
MicroCoreLabs wrote: Thu Aug 25, 2022 5:57 pm I believe the UART flow control needs to be enabled in the Cyclone-V SOC configuration inside of the HPS. I recall reading that it is disabled by default, and they seems to be what you see.

Actually, is there no activity in either direction? Maybe your core is also not using flow control on your UART.

Once you fix this, you should able to run at megabit speeds on the UART. :)
I set a trigger on all signals... and if I did it right, it only detected the level change on RX/TX.

Thanks for the heads up, now it's time to pull the thread and find out how to enable it.
Haven't read back to figure out what you're trying to do with UART, but if you're having troubles you may not have added it to the config string yet:
https://github.com/MiSTer-devel/Main_Mi ... ion-string
For example:
https://github.com/MiSTer-devel/ao486_M ... 86.sv#L199
MicroCoreLabs
Core Developer
Posts: 96
Joined: Sun Jun 05, 2022 6:12 pm
Location: California
Has thanked: 6 times
Been thanked: 86 times
Contact:

Re: MiSTer PCXT

Unread post by MicroCoreLabs »

Thanks for the heads up, now it's time to pull the thread and find out how to enable it.
If you are not able to enable the hardware flow control then perhaps you could use XON/XOFF which requires no additional flow control signals like CTS/RTS. Each side simply adds a byte to the UART stream to tell the other side to stop and start. Software needs to be aware of these bytes though while it does not need to be aware of the RTS/CTS signals.
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: MiSTer PCXT

Unread post by pgimeno »

Mills wrote: Thu Aug 25, 2022 11:01 pm I don't know if that's a good idea for 8088, I am testing some file managers and they all use ram or install TSR programs that stay in ram and make things slow and glitchy, but maybe it is possible to do it.
The TSR problem can be alleviated by using the TurboPower TSR utils:

http://files.mpoli.fi/software/DOS/UTIL ... RCOM35.ZIP

Description here:

https://www.pcorner.com/list/UTILITY/TSRCOM35.ZIP/INFO/

The basic idea is that you load a TSR called MARK, then load whatever software, and then execute RELEASE /K to get rid of the MARK and (most importantly) any other TSRs loaded after it.
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

MicroCoreLabs wrote: Fri Aug 26, 2022 1:26 am If you are not able to enable the hardware flow control then perhaps you could use XON/XOFF which requires no additional flow control signals like CTS/RTS. Each side simply adds a byte to the UART stream to tell the other side to stop and start. Software needs to be aware of these bytes though while it does not need to be aware of the RTS/CTS signals.
Ideally, CTS/RTS should be used so that no additional code needs to be added. But now I have to understand why it doesn't work, in the Linux part I see that it is enabled:
ctrscts.png
ctrscts.png (10.31 KiB) Viewed 12161 times
I was wrong when I said there was no activity on RTS/CTS, but I am only observing it on RTS and only once during the core reset, then it always stays at 0:
uart_rts_n.png
uart_rts_n.png (19.84 KiB) Viewed 12161 times
The trigger is only activated twice, once just at the start of the core (at 1) and once when the recognition of COM devices is about to start (at 0). After that, there is no further change during the read or write.
User avatar
spark2k06
Core Developer
Posts: 876
Joined: Sat Jun 06, 2020 9:05 am
Has thanked: 409 times
Been thanked: 969 times

Re: MiSTer PCXT

Unread post by spark2k06 »

GreyRogue wrote: Fri Aug 26, 2022 12:08 am
Haven't read back to figure out what you're trying to do with UART, but if you're having troubles you may not have added it to the config string yet:
https://github.com/MiSTer-devel/Main_Mi ... ion-string
For example:
https://github.com/MiSTer-devel/ao486_M ... 86.sv#L199
I have done some tests with this, but the result has always been that serdrive does not work.
User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: MiSTer PCXT

Unread post by Caldor »

Mills wrote: Thu Aug 25, 2022 11:01 pm
NightShadowPT wrote: Wed Aug 24, 2022 6:49 pm Good to see this core released!

Great job!

Is there any equivalent to the eXo/Flynn Top 300 DOS Pack for this core? (focusing on 8086 games)
I don't know if that's a good idea for 8088, I am testing some file managers and they all use ram or install TSR programs that stay in ram and make things slow and glitchy, but maybe it is possible to do it.
Have you tried just loading it into high ram?

Also:
[Alexey Melnikov 2022-08-25 3570c8b]
Merge pull request #686 from spark2k06/master

Cleanup initialization PCXT

MiSTer Main just accepted the pull request from Spark :)
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 497 times
Been thanked: 467 times

Re: MiSTer PCXT

Unread post by akeley »

Mills wrote: Thu Aug 25, 2022 11:01 pm I don't know if that's a good idea for 8088, I am testing some file managers and they all use ram or install TSR programs that stay in ram and make things slow and glitchy, but maybe it is possible to do it.
I've used an early version of Norton Commander in my collection, it works rather well. Possibly could be tweaked to be even better. Also flynn/bbond's MyMenu is working. Total DOS Launcher is working too, though its does throw unpacking errors occasionally - but I guess it's not its fault and to be resolved in the future on the packer side (might be related to the problem mentioned in this thread already not long ago).

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

User avatar
Caldor
Top Contributor
Posts: 930
Joined: Sat Jul 25, 2020 11:20 am
Has thanked: 112 times
Been thanked: 111 times

Re: MiSTer PCXT

Unread post by Caldor »

akeley wrote: Fri Aug 26, 2022 10:54 am
Mills wrote: Thu Aug 25, 2022 11:01 pm I don't know if that's a good idea for 8088, I am testing some file managers and they all use ram or install TSR programs that stay in ram and make things slow and glitchy, but maybe it is possible to do it.
I've used an early version of Norton Commander in my collection, it works rather well. Possibly could be tweaked to be even better. Also flynn/bbond's MyMenu is working. Total DOS Launcher is working too, though its does throw unpacking errors occasionally - but I guess it's not its fault and to be resolved in the future on the packer side (might be related to the problem mentioned in this thread already not long ago).
I can recommend trying Volkov Commander. But I did try Norton Commander 3 in the collection shared that has quite a selection of games. Norton Commander 3 might have some features Volkov Commander lacks, but I like how easy it is to fit Volkov Commander on a floppy disk because I think its less than 200kb. I think it might be possible to use loadhigh on the whole program. I guess another option is to put it on a 512kb RAMdisk. Although I am not sure that makes any difference if it still ends up having to be put into memory.
darkavengerbr
Posts: 9
Joined: Fri Feb 04, 2022 6:06 pm
Has thanked: 2 times
Been thanked: 1 time

Re: MiSTer PCXT

Unread post by darkavengerbr »

First of all, thanks for the great work on this core.
I am trying the core with pre-built hd img files i downloaded.
the question is ( sorry if already answered , but couldnt find) how can I easily tranfer files from my windows pc to an hd img file?
there is an utility for this? I tried 7zip but it only let me read the file and the mounting option in windows gives an error.
Sorry if this too Basic.

Cheers!
akeley
Top Contributor
Posts: 1441
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 497 times
Been thanked: 467 times

Re: MiSTer PCXT

Unread post by akeley »

darkavengerbr wrote: Fri Aug 26, 2022 1:23 pm the question is ( sorry if already answered , but couldnt find) how can I easily tranfer files from my windows pc to an hd img file?
It's not that straightforward, though I might be missing something. You can use ao486 core on MiSTer plus Dos Navigator or other file manager, and copy from your "normal" vhds (those made for ao486 and mountable in Windows).

Or use PCem emulator on your PC. The PCXT images will work in that. Problem is then you have to make iso CD images with your files from Windows directories, because you can't mount them directly in that emu. Still, that's what I did when moving large amount of files:
-create a Pentium instance in PCem
-use Win98 SE hdd install as C: (there is one ready made on archive.org)
-use the PCXT hdd image as secondary
-mount a premade iso with my files as CDROM
-copy from iso to PCXT hdd using Total Commander

If there's an easier method I'm all ears, as it is a bit of faffing about.

CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: MiSTer PCXT

Unread post by jordi »

akeley wrote: Fri Aug 26, 2022 1:57 pm
darkavengerbr wrote: Fri Aug 26, 2022 1:23 pm the question is ( sorry if already answered , but couldnt find) how can I easily tranfer files from my windows pc to an hd img file?
It's not that straightforward, though I might be missing something. You can use ao486 core on MiSTer plus Dos Navigator or other file manager, and copy from your "normal" vhds (those made for ao486 and mountable in Windows).

Or use PCem emulator on your PC. The PCXT images will work in that. Problem is then you have to make iso CD images with your files from Windows directories, because you can't mount them directly in that emu. Still, that's what I did when moving large amount of files:
-create a Pentium instance in PCem
-use Win98 SE hdd install as C: (there is one ready made on archive.org)
-use the PCXT hdd image as secondary
-mount a premade iso with my files as CDROM
-copy from iso to PCXT hdd using Total Commander

If there's an easier method I'm all ears, as it is a bit of faffing about.
Just mount in your normal OS the image.

In windows, you'll use Imdisk software.

Linux and Mac, mount or diskutil
breiztiger
Top Contributor
Posts: 468
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 35 times
Been thanked: 99 times

Re: MiSTer PCXT

Unread post by breiztiger »

Osfmount is good also
CPC-Power Staff
ShyTalk
Posts: 27
Joined: Mon May 24, 2021 8:55 pm
Has thanked: 7 times
Been thanked: 3 times

Re: MiSTer PCXT

Unread post by ShyTalk »

Hi, I can see you guys are working on a higher level, but, I’m trying to get the core working but I’m struggling with the boot.rom. I’m trying to follow this thread but it’s a fair few IQ points beyond me…. It seems like once upon a time the boot.rom I need to get this running was in the SW folder on github but it doesn’t appear to be there now. Also, it seems you can run a “python script” which i’ve tried but I knew I’d fail to get it working correctly…. my level is more ‘plug console in and turn on’.

Is there any other way of obtaining the boot.rom? For instance, could someone message me with it all? That would be very kind!

Thanks for any help.

Cheers,
Post Reply