Page 11 of 47

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 4:25 am
by kitune-san
spark2k06 wrote: Sat Jun 18, 2022 4:06 am If you have a working version, can you update this branch with the changes, or... can you provide the synthesised .rbf file here for me to test? :)
Please give it a try.

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 4:28 am
by dmckean
thorr wrote: Sat Jun 18, 2022 4:18 am
dmckean wrote: Sat Jun 18, 2022 3:38 am Now we just need either floppy or IDE support so those of us without COM adapters can play along at home.
I am not sure if IDE would even work with this. Back then, the drives were RLL or MFM from what I recall.
Hard drive controllers were self contained 8-bit ISA cards and there were definitely IDE ones later on when MFM and RLL drives became obsolete.

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 4:41 am
by kitune-san
kitune-san wrote: Sat Jun 18, 2022 4:25 am
spark2k06 wrote: Sat Jun 18, 2022 4:06 am If you have a working version, can you update this branch with the changes, or... can you provide the synthesised .rbf file here for me to test? :)
Please give it a try.
Apparently, sometimes they succeed and sometimes they fail.
I noticed this by turning the power on and off repeatedly.

More timing adjustment is needed.

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 5:02 am
by spark2k06
kitune-san wrote: Sat Jun 18, 2022 4:41 am
kitune-san wrote: Sat Jun 18, 2022 4:25 am
spark2k06 wrote: Sat Jun 18, 2022 4:06 am If you have a working version, can you update this branch with the changes, or... can you provide the synthesised .rbf file here for me to test? :)
Please give it a try.
Apparently, sometimes they succeed and sometimes they fail.
More timing adjustment is needed.
Apparently, the rbf you sent is working fine for me :D . Can you update your branch add-sram with this change?

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 5:27 am
by Malor
FWIW, I don't think it's any problem hooking an IDE interface up to an XT. The real things didn't have IDE, but AFAIK it will retrofit perfectly. Trying to rebuild MFM and RLL drives would probably be a lot of work for no particular benefit.

The Monotech NuXT, for instance, has an IDE controller built into the motherboard:

https://monotech.fwscart.com/NuXT_v20_M ... 77986.aspx

edit: I mean, with real MFM drives, you had to silver them yourself (low-level format) by running DEBUG and jumping to a specific address in the ROM BIOS. The command might have been g=c800:6, but I'm probably not quite right there. That would pop you into a BIOS interface where you would manually choose the drive interleave and lay down a low-level format, carefully entering the bad sectors that were on a sticker on top of the drive. And woe betide you if you chose an interleave that was wrong.... too loose and the drive would be slower than it should be, but too tight and the drive would take a gigantic performance hit. Only then would you do a high level partition and FAT format.

I mean, that whole setup sucked terribly. MFM and RLL were awful. Dealing with all that nonsense is just silly when you're dealing with virtual drives that have neither interleave nor bad sectors. IDE will be so much better.

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 5:31 am
by kitune-san
spark2k06 wrote: Sat Jun 18, 2022 5:02 am Apparently, the rbf you sent is working fine for me :D . Can you update your branch add-sram with this change?
I saved my working project(.qsf) file.
PCXT.sdc was added to the end of the file list.
https://github.com/kitune-san/PCXT_MiST ... -myproject

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 5:34 am
by spark2k06
Malor wrote: Sat Jun 18, 2022 5:27 am FWIW, I don't think it's any problem hooking an IDE interface up to an XT. The real things didn't have IDE, but AFAIK it will retrofit perfectly. Trying to rebuild MFM and RLL drives would probably be a lot of work for no particular benefit.

The Monotech NuXT, for instance, has an IDE controller built into the motherboard:

https://monotech.fwscart.com/NuXT_v20_M ... 77986.aspx

edit: I mean, with real MFM drives, you had to silver them yourself (low-level format) by running DEBUG and jumping to a specific address in the ROM BIOS. The command might have been g=c800:6, but I'm probably not quite right there. That would pop you into a BIOS interface where you would manually choose the drive interleave and lay down a low-level format, carefully entering the bad sectors that were on a sticker on top of the drive. And woe betide you if you chose an interleave that was wrong.... too loose and the drive would be slower than it should be, but too tight and the drive would take a gigantic performance hit. Only then would you do a high level partition and FAT format.

I mean, that whole setup sucked terribly. MFM and RLL were awful. Dealing with all that nonsense is just silly when you're dealing with virtual drives that don't have interleave and don't have bad sectors. IDE will be so much better.
Yes, we just need an 8-bit IDE controller, preferably on the 300h I/O port so that the XTIDE Universal BIOS will recognise it and use it without reconfiguring it.

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 5:35 am
by MicroCoreLabs
It turns out that at some point it stopped working as "well" as it used to. It used to go further but now, even with 640Kb of RAM, it stays in this part of the demo, in a loop:
The demo uses multiple HALT opcodes in a row in combination with an interrupt to synchronize timing. If your timer interrupts or the 8288 handling of the HALT command are not correct it could explain why you are getting stuck here.

I suggest simulating your 8288, 8253 and 8259 in a small test bench to thoroughly debug their functionality. The design should also be fully constrained, otherwise you could get inconsistent results between synthesis passes, over temperature, and between devices.

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 5:45 am
by spark2k06
MicroCoreLabs wrote: Sat Jun 18, 2022 5:35 am
It turns out that at some point it stopped working as "well" as it used to. It used to go further but now, even with 640Kb of RAM, it stays in this part of the demo, in a loop:
The demo uses multiple HALT opcodes in a row in combination with an interrupt to synchronize timing. If your interrupts are not correct it could explain why you are getting stuck here.

I suggest simulating your 8253 and 8259 in a small test bench to thoroughly debug their functionality. The design also should be fully constrained, otherwise you could get inconsistent results between synthesis passes, over temperature, and between devices.
By the way, I found out why it sometimes slows down... it happens when there are disk reads, which at the moment are occurring over the serial port at 115.2Kbps.

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 8:07 am
by spark2k06
kitune-san wrote: Sat Jun 18, 2022 4:41 am
Apparently, sometimes they succeed and sometimes they fail.
I noticed this by turning the power on and off repeatedly.

More timing adjustment is needed.
I can't reproduce the problem you mention that sometimes happens, apparently everything is going well. I have moved your contribution to the main branch, and I have cloned the previous version to a new branch named bram_256Kb_ram. However, if it happens to you, it will happen.... any improvement in this respect will be welcome, thanks!!! ;)

Re: MiSTer PCXT

Posted: Sat Jun 18, 2022 10:22 am
by kitune-san
spark2k06 wrote: Sat Jun 18, 2022 8:07 am However, if it happens to you, it will happen.... any improvement in this respect will be welcome, thanks!!! ;)
I forgot to write SDRAM_CLK in the SDC file.
This is probably the reason for the instability.

Re: MiSTer PCXT

Posted: Sun Jun 19, 2022 3:58 am
by flynnsbit
spark2k06 wrote: Sat Jun 04, 2022 5:59 am I have built myself a DB9 -> USB cable with an adapter:

db9-usb.jpg

From the next pinout of the DB9 connector:

Code: Select all

DB9 MiSTer
 
1 - DSR
2 - N/C
3 - TX
4 - RTS
5 - VCC (5V)
6 - CTS
7 - RX
8 - GND
9 - DCD
Shield - DTR

logically, by crossing the signals: TX <-> RX, DSR <-> DTR and RTS <-> CTS. I have not connected VCC because it is not necessary in this case. The USB is already powered directly from the PC.

It looks like there is communication, but I get checksum error and the HD image is not detected:

serdrive.png

Last changes:

https://github.com/spark2k06/PCXT_MiSTe ... 009305dfa0

There always seems to be a problem... I'll get back to the floppy or IDE booting line of work.
I'm thinking about forging ahead and trying the serial loading of images with xtide. tomorrow. I have a couple of questions.

1. So on this adapter you connected the usb to a modern PC and set up serdrive to host it over the com associated in windows to the adapter you connected. At what speed, error control etc? 9600,8,1?

2. That adapter on the serial side is plugging directly into the USer IO port on a Mister IO board into the IO Port (USB style) or into Antonio's DB9 implementation of the Serial interface? If USB I/O are you using a level converter or just something straight like this: https://misterfpga.co.uk/product/mister ... -adapters/ if you pick the Sega adapter??

3. verify the speed you are running serial at to get them both to talk to each other.

I've started on an image with CGA only games that run either 4 or 7mhz with MyMenu. I already had this for my real PCJr so I am just converting it to this core. Once we get VHDs/IDEs I can do updates from Github for the contents of the "Packs"

This core is my holy grail and I am so enjoying ya'll working openly with it on the forum. Thank you for doing that.

Re: MiSTer PCXT

Posted: Sun Jun 19, 2022 4:30 am
by spark2k06
flynnsbit wrote: Sun Jun 19, 2022 3:58 am
I'm thinking about forging ahead and trying the serial loading of images with xtide. tomorrow. I have a couple of questions.

1. So on this adapter you connected the usb to a modern PC and set up serdrive to host it over the com associated in windows to the adapter you connected. At what speed, error control etc? 9600,8,1?

2. That adapter on the serial side is plugging directly into the USer IO port on a Mister IO board into the IO Port (USB style) or into Antonio's DB9 implementation of the Serial interface? If USB I/O are you using a level converter or just something straight like this: https://misterfpga.co.uk/product/mister ... -adapters/ if you pick the Sega adapter??

3. verify the speed you are running serial at to get them both to talk to each other.

I've started on an image with CGA only games that run either 4 or 7mhz with MyMenu. I already had this for my real PCJr so I am just converting it to this core. Once we get VHDs/IDEs I can do updates from Github for the contents of the "Packs"

This core is my holy grail and I am so enjoying ya'll working openly with it on the forum. Thank you for doing that.
I don't know if I mentioned it at the end, but you only need the Tx and Rx signals from the USER I/O port:

Code: Select all

	//
	// Pin | USB Name |   |Signal
	// ----+----------+---+-------------
	// 0   | D+       | I |RX
	// 1   | D-       | O |TX
	// 2   | TX-      | O |RTS
	// 3   | GND_d    | I |CTS
	// 4   | RX+      | O |DTR
	// 5   | RX-      | I |DSR
	// 6   | TX+      | I |DCD
	//
That is, pins 0 and 1 only. Either directly from the MiSTer's USB3 connector or with a DB9 adapter (Antonio's or the Sega adapter with SNAC), you just need to know where those pins are located.

That said, it is best to use an adapter like this one, on Aliexpress for example:

https://es.aliexpress.com/item/32665965133.html
uart_usb.png
uart_usb.png (92.41 KiB) Viewed 4372 times
As I say, you will only need to use the Tx and Rx signals, crossing them with the signals of this device, well, and GND too... the rest is not necessary. Finally, the image can be served at maximum speed (115.2Kbps):

Code: Select all

serdrive.exe -c <port> -d 115.2KB <image>
I'm glad you like this initiative of developing a PCXT core, I hope that soon we will have available some alternative OS loading, either via floppy or via 8 bits IDE interface thanks to Universal XTIDE BIOS which uses core... a topic I'm personally stuck on :(

Edit: The pinout I showed in the previous post was from Antonio's DB9 connector.

Re: MiSTer PCXT

Posted: Sun Jun 19, 2022 7:38 am
by held
When you eventually get to mounting floppy images. Please look at the "transcopy" disk format, because it handles "copy protected disks" like weak bits, extra tracks, different sector sizes etc..

Just something to consider :D

Re: MiSTer PCXT

Posted: Sun Jun 19, 2022 9:26 am
by breiztiger
yes that's very good to have protected format like transcopy or ipf

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 5:48 am
by spark2k06
Beta 0.10
  • Increased RAM mapping in SDRAM: 0x00000-0xAFFFF and 0xC0000-0xEFFFF


Segments 0xB0000 (VRAM) and 0xF0000 (BIOS) are still assigned to BRAM

https://github.com/spark2k06/PCXT_MiSTe ... 656cbd3a89

I also update the SRAM version with the same feature:

https://github.com/spark2k06/PCXT_MiSTe ... bb9249e9cd

With this new feature, I tried the Use!UMB.sys application, and then used DOSMAX to maximise the conventional memory available, but there must be some bug in the core that makes it hang:
Use!UMBs_failure.png
Use!UMBs_failure.png (481.87 KiB) Viewed 4152 times
It will have to be investigated at some point, in this sense, it would be nice if MiSTer had some way of debugging the logs from the OSD. Does anyone know if this kind of debugging is currently possible?

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 11:24 am
by wark91
Thank you !
Is DOSMAX really usefull for PCXT softwares (programs, games, etc ...) ?
Have you tried DOS/V (a japanese version of DOS) on the current core ?

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 1:05 pm
by kitune-san
spark2k06 wrote: Mon Jun 20, 2022 5:48 am
With this new feature, I tried the Use!UMB.sys application, and then used DOSMAX to maximise the conventional memory available, but there must be some bug in the core that makes it hang:
I do not know about access to RAM in the UMB area.
Does this automatically recognize RAM in the UMB area?
Or is it something that needs to be configured beforehand?

...Actually, I am not familiar with PC/AT/XT and 8/16-bit old CPUs.
I was born in 1994 and the first PC I used had windows 2000 installed.
The 640k barrier had already broken.
So I need a lot of information to know what is going on.

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 1:16 pm
by spark2k06
wark91 wrote: Mon Jun 20, 2022 11:24 am Thank you !
Is DOSMAX really usefull for PCXT softwares (programs, games, etc ...) ?
Have you tried DOS/V (a japanese version of DOS) on the current core ?
It is always useful to have plenty of conventional memory available, plus resident programs that can run at the same time as memory-demanding programs. As for DOS/V, I didn't know about it to be honest, I'm sure kitune-san has used it :)

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 1:42 pm
by spark2k06
kitune-san wrote: Mon Jun 20, 2022 1:05 pm
spark2k06 wrote: Mon Jun 20, 2022 5:48 am
With this new feature, I tried the Use!UMB.sys application, and then used DOSMAX to maximise the conventional memory available, but there must be some bug in the core that makes it hang:
I do not know about access to RAM in the UMB area.
Does this automatically recognize RAM in the UMB area?
Or is it something that needs to be configured beforehand?

...Actually, I am not familiar with PC/AT/XT and 8/16-bit old CPUs.
I was born in 1994 and the first PC I used had windows 2000 installed.
The 640k barrier had already broken.
So I need a lot of information to know what is going on.
USE!UMBS is a driver that allows the use of upper memory blocks in DOS. Is the recommended driver, along with DOSMAX to move DOS to upper memory. With the optimum configuration, it should leave you with only 10Kb of conventional memory used. DOS 5.0 or later is required. More info about setup:

More information about its configuration and DOSMAX:

https://github.com/monotech/NuXTv2/blob ... Manual.pdf
https://studylib.net/doc/7892106/dosmax ... hilip-b.-g...

I have used it on a real PCXT and it works perfectly (on a Sergey Kiselev's Micro 8088).

I have had problems with this driver on a few occasions, it would also hang up. They have been problems related to the accessibility to the configured memory segments, but I think this is not the case, although just in case I will spend some time to check that everything is correctly configured... I have already tested that it reads and writes in all the new memory mapped up to the megabyte.

As for the debugging issue, it occurred to me that we could use the MDA memory (0xB0000) to dump in real time the content of the registers... in this way, it might give us a clue as to what is going on, in the end it could be related to something in common with other programs and games that don't work, like some of the ones I've tested:
  • Tapper (Error Disk)
  • Bubble Bobble
  • Solomon's Key (No movement of the character, cursors)
  • Popcorn (no movement of the shovel, cursors)
  • Centipede (Ship goes to the left by itself and shoots continuously)
  • Game Over
  • Phantis
  • Robocop
  • Prohibition (can't get past the menu, problem with the keyboard)
  • Boulder (problem with the keyboard)

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 1:46 pm
by spark2k06
In any case, these are the topics that I can implement, for me the topic of SD or VHD loading via 8-bit IDE is a bit too big for me, so the next thing I will do will be to implement expanded memory (EMS) :)

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 2:24 pm
by spark2k06
So far I see that the UMB driver is working, what is really stuck is the DOSMAX application, which would run right after in the config.sys, that's something :)
UMB_OK2.jpg
UMB_OK2.jpg (109.96 KiB) Viewed 3943 times

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 3:12 pm
by breiztiger
Hi

Before ems, can you look at floppy ?

We can help you more easily than actualy with serial

Thanks for your hard work on that neat core

Re: MiSTer PCXT

Posted: Mon Jun 20, 2022 3:57 pm
by spark2k06
breiztiger wrote: Mon Jun 20, 2022 3:12 pm Hi

Before ems, can you look at floppy ?

We can help you more easily than actualy with serial

Thanks for your hard work on that neat core
It was one of the first things I tried:

https://github.com/spark2k06/PCXT_MiSTer/tree/fdd-test

I tried to take advantage of the floppy module of the ao486 core, but without success, I think the module would have to be adapted to communicate with the HPS at 8 bits instead of 16. As I can't move forward in this sense either, I move forward with what I know I'll be able to do, and so now it's EMS, at least on my side 😉

Moreover, when we get floppy or IDE it will be beta 1.0, because it would already be an accessible core to all users.

Re: MiSTer PCXT

Posted: Tue Jun 21, 2022 2:58 pm
by kitune-san
The 101 error in the original XT BIOS was caused by not using DMA for memory refresh.
It's experimental. If the following change is made to return 0x01 on the status read, the 101 error will no longer occur.
However, it then stops with error 601.

In the future, I would like to perform SDRAM refresh by DMA events.

In KF8237.sv, line 241
2022-06-21 235000.png
2022-06-21 235000.png (18.08 KiB) Viewed 3684 times

Re: MiSTer PCXT

Posted: Tue Jun 21, 2022 3:53 pm
by spark2k06
kitune-san wrote: Tue Jun 21, 2022 2:58 pm The 101 error in the original XT BIOS was caused by not using DMA for memory refresh.
It's experimental. If the following change is made to return 0x01 on the status read, the 101 error will no longer occur.
However, it then stops with error 601.

In the future, I would like to perform SDRAM refresh by DMA events.

In KF8237.sv, line 241
2022-06-21 235000.png
Very well done! Error 601 is not so important, it seems to be related to the absence of floppy:

http://minuszerodegrees.net/5160/post/5 ... errors.htm

Some possible 601 causes:

• Floppy controller card - faulty.
• Floppy controller card - dirty edge connectors.
• Floppy controller card - not seated correctly in motherboard's expansion slot.
• Motherboard - edge connector contacts in expansion slot are dirty/damaged. (Try a different slot.)
• Motherboard with 1986 dated BIOS - SW1 switches not set correctly for the number of floppy drives fitted.
• Floppy cable - faulty.
• Floppy cable - not the correct type for a 5160 - see here.
• Floppy cable - not fitted correctly - see here.
• Floppy drive - missing.
• Floppy drive - faulty.
• Floppy drive - drive select jumper not set properly - see here.
• Floppy drive - not compatible.
• Floppy drive - compatible, but not configured correctly for a 5160.
• Floppy drive - some cases of improper termination.

Re: MiSTer PCXT

Posted: Tue Jun 21, 2022 4:23 pm
by spark2k06
kitune-san wrote: Tue Jun 21, 2022 2:58 pm The 101 error in the original XT BIOS was caused by not using DMA for memory refresh.
It's experimental. If the following change is made to return 0x01 on the status read, the 101 error will no longer occur.
However, it then stops with error 601.

In the future, I would like to perform SDRAM refresh by DMA events.

In KF8237.sv, line 241
2022-06-21 235000.png
It no longer gives error 101, although it does not pass the tests:
DMA_Failure.jpg
DMA_Failure.jpg (109.23 KiB) Viewed 3622 times

Re: MiSTer PCXT

Posted: Tue Jun 21, 2022 4:36 pm
by spark2k06
As for floppy, I have been tipped off about the existence of a module that could be a candidate to be used, I think it only lacks the DMA signals, which I don't know to what extent they are essential... it's from the MiSTer Acorn Archimedes core:

https://github.com/MiSTer-devel/Archie_ ... er/rtl/fdc

We will have to take a look at it and see what can be done.

Re: MiSTer PCXT

Posted: Wed Jun 22, 2022 2:23 pm
by spark2k06
spark2k06 wrote: Tue Jun 21, 2022 4:36 pm As for floppy, I have been tipped off about the existence of a module that could be a candidate to be used, I think it only lacks the DMA signals, which I don't know to what extent they are essential... it's from the MiSTer Acorn Archimedes core:

https://github.com/MiSTer-devel/Archie_ ... er/rtl/fdc

We will have to take a look at it and see what can be done.
Nothing, I can't see how to implement it. I'm going to investigate another alternative, at least for temporary use to reach more users. Let's see if I can run the serdrive code in the Linux part of MiSTer (it has source code) and connect to the core via UART... so that it's not necessary to get a USB cable and connect it to the PC.

Re: MiSTer PCXT

Posted: Wed Jun 22, 2022 5:38 pm
by wark91
have you think to use the second SD Card present on the I/O board of the MiSTer until a better solution is found ?