MiSTer PCXT
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: MiSTer PCXT
Could we focus on the test programs? I believe they are executed without any interrupt in the middle of the transfer.
From my disassembly though, they are incomplete, in that they don't clear the destination area prior to the move. But that could give false negatives (pass the test), not false positives (fail the test).
From my disassembly though, they are incomplete, in that they don't clear the destination area prior to the move. But that could give false negatives (pass the test), not false positives (fail the test).
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Top Contributor
- Posts: 531
- Joined: Tue May 26, 2020 5:06 am
- Has thanked: 87 times
- Been thanked: 211 times
Re: MiSTer PCXT
Thanks...pgimeno wrote: ↑Fri Aug 19, 2022 3:36 pm
Wikipedia is not the best source for interrupt information. Ralf Brown's interrupt list has this to say about this function:
Emphasis in "(AT/PS w enh keybd only)"Code: Select all
--------B-1605------------------------------- INT 16 - KEYBOARD - STORE KEYSTROKE IN KEYBOARD BUFFER (AT/PS w enh keybd only) AH = 05h CH = BIOS scan code CL = ASCII character Return: AL = status 00h if successful 01h if keyboard buffer full AH destroyed by many BIOSes
It also lists different behaviours for this function on PCjr and Tandy 2000.
You can emulate it by grabbing the circular buffer pointers in the BIOS memory area and inserting the key in the buffer yourself.
changed the code modify the buffer directly... and now it works!
Strange that it worked on x86box with my XT config
Code: Select all
Procedure StuffKeyCode(KeyCode : word); assembler;
Asm
cli
mov es, Seg0040
mov di, 001Ch
mov ax, KeyCode
mov bx, es:[di]
mov es:[bx], ax
add byte ptr es:[di], 2
cmp byte ptr es:[di], 60
jle @end
mov byte ptr [es:di], 30
@end:
sti
End;
-
- 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
Could you add some MCL86 signals to SignalTap with a trigger on the 0x5C write?
The first MOVSB was successful and after this instruction CX equals zero, so it appears that the CX number of bytes were transferred with all but the first being read from or written to the wrong segment. Triggering on the first write and looking at the subsequent cycles will tell us the story.
We need to see the BIU signals: biu_muxed_segment, addr_out_temp, EU_BIU_COMMAND, biu_state, and the 8088 local bus would be helpful.
If you trigger on the 0x5C write we should be able to see the subsequent segment-overriden read and write cycles as requested by the EU.
That said, im not sure the prefixed MOVSB is broken. I don't think DEBUG will preserve all of an opcodes prefixes if it is a genuine 8088, so the example you showed using another emulator may not reflect what the real silicon is doing. The MCL86 does try to adopt these quirks...
The issue with DOSMAX may lie somewhere else...
The first MOVSB was successful and after this instruction CX equals zero, so it appears that the CX number of bytes were transferred with all but the first being read from or written to the wrong segment. Triggering on the first write and looking at the subsequent cycles will tell us the story.
We need to see the BIU signals: biu_muxed_segment, addr_out_temp, EU_BIU_COMMAND, biu_state, and the 8088 local bus would be helpful.
If you trigger on the 0x5C write we should be able to see the subsequent segment-overriden read and write cycles as requested by the EU.
That said, im not sure the prefixed MOVSB is broken. I don't think DEBUG will preserve all of an opcodes prefixes if it is a genuine 8088, so the example you showed using another emulator may not reflect what the real silicon is doing. The MCL86 does try to adopt these quirks...
The issue with DOSMAX may lie somewhere else...
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
Re: MiSTer PCXT
In the driver, I have tried putting the INT 3 right at the end, where the RET of the function is. The content of that memory area is wrong, just like before with the debugger step-by-step.MicroCoreLabs wrote: ↑Fri Aug 19, 2022 7:06 pm Of course the SS is necessarily modified when an interrupt is taken. The DS is not. Suspicious, no?
I believe the sequence you isolated is being interrupted in the middle of the REP, possibly after the first copy. And on the genuine 8088 which has a bug where only the prefix preceding the MOVSB is saved.
Also, I suspect that DEBUG will also debounce the REP and maybe the reason you only see one successful copy.
Maybe you can allow this sequence to run and use a breakpoint on an opcode after the sequence to see if all bytes were copied.
I have also tried to put a CLI before the REP MOVSB and then the STI... same result, both in the driver and in the test program I have done.
I don't have much experience with signal tap, but I'll give it a try, I'll let you know.MicroCoreLabs wrote: ↑Sat Aug 20, 2022 4:40 am Could you add some MCL86 signals to SignalTap with a trigger on the 0x5C write?
The first MOVSB was successful and after this instruction CX equals zero, so it appears that the CX number of bytes were transferred with all but the first being read from or written to the wrong segment. Triggering on the first write and looking at the subsequent cycles will tell us the story.
We need to see the BIU signals: biu_muxed_segment, addr_out_temp, EU_BIU_COMMAND, biu_state, and the 8088 local bus would be helpful.
If you trigger on the 0x5C write we should be able to see the subsequent segment-overriden read and write cycles as requested by the EU.
That said, im not sure the prefixed MOVSB is broken. I don't think DEBUG will preserve all of an opcodes prefixes if it is a genuine 8088, so the example you showed using another emulator may not reflect what the real silicon is doing. The MCL86 does try to adopt these quirks...
The bug in DOSMAX may be somewhere else...
-
- 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
I think I found the error in the microcode. It looks like the segment override selection is being cleared by mistake across all string opcodes.
For a quick fix can you look for the sequence 4ddf0000 5c7f0000 in the microcode - there should be eight instances of this sequence.
For each one please change the 4ddf0000 to 4ddf0003 and see how it works!
For a quick fix can you look for the sequence 4ddf0000 5c7f0000 in the microcode - there should be eight instances of this sequence.
For each one please change the 4ddf0000 to 4ddf0003 and see how it works!
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
Re: MiSTer PCXT
Something is wrong, it starts to load the Tandy BIOS but stays like that... it hasn't even deleted the previous content of the splash screen:MicroCoreLabs wrote: ↑Sat Aug 20, 2022 6:55 am I think I found the error in the microcode. It looks like the segment override selection is being cleared by mistake across all string opcodes.
For a quick fix can you look for the sequence 4ddf0000 5c7f0000 in the microcode - there should be eight instances of this sequence.
For each one please change the 4ddf0000 to 4ddf0003 and see how it works!
I also attach the modified microcode file in case I have modified it wrong.
- Attachments
-
- microcode.zip
- (10.4 KiB) Downloaded 130 times
-
- 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
Your microcode doesn't seem right. Did you you replace both 4ddf0000 and 5c7f0000 with a single line 4ddf0003? 5c7f0000 is missing in your microcode...
You just want to change the eight instances of 4ddf0000 that precede 5c7f0000 with 4ddf0003. Just the two bits
You just want to change the eight instances of 4ddf0000 that precede 5c7f0000 with 4ddf0003. Just the two bits
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
Re: MiSTer PCXT
It works!
More testing to be done now but it looks very good. I attach binary so that more users can test it. This would be the definitive change for an official release or do you think it needs a different solution?
More testing to be done now but it looks very good. I attach binary so that more users can test it. This would be the definitive change for an official release or do you think it needs a different solution?
- Attachments
-
- PCXT.rbf
- (3.23 MiB) Downloaded 144 times
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
Re: MiSTer PCXT
Here is the best possible configuration to have no more and no less than 630Kb of conventional memory available and 2MB of EMS in MS-Dos 6.22:
- Attachments
-
- config.zip
- (88.21 KiB) Downloaded 186 times
-
- 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
It's a definitive changeThis would be the definitive change for an official release or do you think it needs a different solution?
The MCL86 has two bits to store the segment override register and another bit to activate this override. The problem is that I was clearing both fields when I should have only cleared the activate bit. When cleared the segment override register points to the DS which was what you were seeing. Rather than just ANDing 0x0000 I changed it to 0x0003 to mask off these bits. Easy fix.
I will upload the new microcode to GitHub shortly.
Re: MiSTer PCXT
I cannot seem to be able to compile the pcxt.rom and tandy.rom. I keep getting error invalid character '-' (U+00B7). Thats the line for the
C:\PCXT>python make_rom_with_ibm5160.py
File "C:\PCXT\make_rom_with_ibm5160.py", line 68
<title>PCXT_MiSTer/make_rom_with_ibm5160.py at main · spark2k06/PCXT_MiSTer · GitHub</title>
^
SyntaxError: invalid character '·' (U+00B7)
C:\PCXT>python make_rom_with_ibm5160.py
File "C:\PCXT\make_rom_with_ibm5160.py", line 68
<title>PCXT_MiSTer/make_rom_with_ibm5160.py at main · spark2k06/PCXT_MiSTer · GitHub</title>
^
SyntaxError: invalid character '·' (U+00B7)
-
- Core Developer
- Posts: 459
- Joined: Wed May 26, 2021 9:35 pm
- Has thanked: 59 times
- Been thanked: 383 times
Re: MiSTer PCXT
Looks like you downloaded the script from git without clicking on the RAW button first. Click on the Raw button then save it.kubbie wrote: ↑Sat Aug 20, 2022 6:46 pm I cannot seem to be able to compile the pcxt.rom and tandy.rom. I keep getting error invalid character '-' (U+00B7). Thats the line for the
C:\PCXT>python make_rom_with_ibm5160.py
File "C:\PCXT\make_rom_with_ibm5160.py", line 68
<title>PCXT_MiSTer/make_rom_with_ibm5160.py at main · spark2k06/PCXT_MiSTer · GitHub</title>
^
SyntaxError: invalid character '·' (U+00B7)
-
- Top Contributor
- Posts: 552
- Joined: Sun May 24, 2020 8:07 pm
- Has thanked: 185 times
- Been thanked: 310 times
- Contact:
Re: MiSTer PCXT
^thisFlandango wrote: ↑Sat Aug 20, 2022 7:19 pmLooks like you downloaded the script from git without clicking on the RAW button first. Click on the Raw button then save it.kubbie wrote: ↑Sat Aug 20, 2022 6:46 pm I cannot seem to be able to compile the pcxt.rom and tandy.rom. I keep getting error invalid character '-' (U+00B7). Thats the line for the
C:\PCXT>python make_rom_with_ibm5160.py
File "C:\PCXT\make_rom_with_ibm5160.py", line 68
<title>PCXT_MiSTer/make_rom_with_ibm5160.py at main · spark2k06/PCXT_MiSTer · GitHub</title>
^
SyntaxError: invalid character '·' (U+00B7)
https://raw.githubusercontent.com/MiSTe ... ibm5160.py
etc...
Re: MiSTer PCXT
Now. I'm getting this when I clicked "raw" and saved.Flandango wrote: ↑Sat Aug 20, 2022 7:19 pmLooks like you downloaded the script from git without clicking on the RAW button first. Click on the Raw button then save it.kubbie wrote: ↑Sat Aug 20, 2022 6:46 pm I cannot seem to be able to compile the pcxt.rom and tandy.rom. I keep getting error invalid character '-' (U+00B7). Thats the line for the
C:\PCXT>python make_rom_with_ibm5160.py
File "C:\PCXT\make_rom_with_ibm5160.py", line 68
<title>PCXT_MiSTer/make_rom_with_ibm5160.py at main · spark2k06/PCXT_MiSTer · GitHub</title>
^
SyntaxError: invalid character '·' (U+00B7)
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
=================== RESTART: C:\PCXT\make_rom_with_ibm5160.py ==================
Traceback (most recent call last):
File "C:\PCXT\make_rom_with_ibm5160.py", line 4, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
EDIT: I figured out my problem. Thanks for the help!
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: MiSTer PCXT
I made some Windows batch scripts for creating the ROM files:
http://dionysus.dk/devstuff/mister/
The jukost one requires WSL installed I think, the Linux subsystem. It will also create the file as pcxt_jukost.rom so it has to be renamed like the open source ones do.
The scripts should download the files from the websites, also the ide_xtl.rom from the git, extract zip files and combine the different files.
Hmm, just got an idea. I will add the zero file that is the problem for the jukost script. Then it should work I think even without WSL. All that part does is help create an empty file of a certain size. So copy the file: "zerofile.tmp" as well.
http://dionysus.dk/devstuff/mister/
The jukost one requires WSL installed I think, the Linux subsystem. It will also create the file as pcxt_jukost.rom so it has to be renamed like the open source ones do.
The scripts should download the files from the websites, also the ide_xtl.rom from the git, extract zip files and combine the different files.
Hmm, just got an idea. I will add the zero file that is the problem for the jukost script. Then it should work I think even without WSL. All that part does is help create an empty file of a certain size. So copy the file: "zerofile.tmp" as well.
Re: MiSTer PCXT
I found that the existing scripts didn't work on actual Linux, because of the difference between "bin" and "BIN".
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
Re: MiSTer PCXT
@wark91, I am not forgetting this, only that modifications have to be made to the Main and must wait until later.spark2k06 wrote: ↑Mon Aug 15, 2022 9:38 amThe fact is that now the core reset is linked to the selected model, which automatically loads the appropriate ROM. To keep the option to load ROM and XTIDE, I should adapt it to ignore the PC model during the reset... via some developer option, because that's really what it is.
I will keep this in mind for future revisions.
Re: MiSTer PCXT
Thank you . I renamed the file ".dsk" to ".ima" and confirmed that it is recognized normally in pcxt core.
Re: MiSTer PCXT
Thanks for this.Caldor wrote: ↑Sat Aug 20, 2022 11:20 pm I made some Windows batch scripts for creating the ROM files:
http://dionysus.dk/devstuff/mister/
The jukost one requires WSL installed I think, the Linux subsystem. It will also create the file as pcxt_jukost.rom so it has to be renamed like the open source ones do.
The scripts should download the files from the websites, also the ide_xtl.rom from the git, extract zip files and combine the different files.
Hmm, just got an idea. I will add the zero file that is the problem for the jukost script. Then it should work I think even without WSL. All that part does is help create an empty file of a certain size. So copy the file: "zerofile.tmp" as well.
Re: MiSTer PCXT
Excellent job! Is quite nice for running early PC games and applications. Kudos!
I noticed an issue with the keyboard not reacting properly to shift/capslock keys. Should I report it here or at Github?
Thanks!
I noticed an issue with the keyboard not reacting properly to shift/capslock keys. Should I report it here or at Github?
Thanks!
-
- Top Contributor
- Posts: 401
- Joined: Wed May 18, 2022 11:20 am
- Has thanked: 127 times
- Been thanked: 412 times
Re: MiSTer PCXT
FDC Progress Report
Floppy Disk Controller is now recognized.
Read has not been confirmed yet. I'm sleepy and will try tomorrow.
Also, the .WIDE setting for hps_io was changed to .WIDE(1).
Floppy Disk Controller is now recognized.
Read has not been confirmed yet. I'm sleepy and will try tomorrow.
Also, the .WIDE setting for hps_io was changed to .WIDE(1).
-
- Top Contributor
- Posts: 468
- Joined: Sun May 24, 2020 7:17 pm
- Has thanked: 35 times
- Been thanked: 99 times
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
Re: MiSTer PCXT
We know, you can log issues as issues on GitHub, when it is possible to review them, we will do it.
Thank you!
- spark2k06
- Core Developer
- Posts: 876
- Joined: Sat Jun 06, 2020 9:05 am
- Has thanked: 409 times
- Been thanked: 969 times
Re: MiSTer PCXT
I have added a second COM2 port (2F8h) experimentally, it now works on the USER_IO but I think a mouse could be implemented there... I would have to try to figure out how to do it:
https://github.com/MiSTer-devel/PCXT_Mi ... a3a25145b1
https://github.com/MiSTer-devel/PCXT_Mi ... a3a25145b1