Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text mode: not working on CGA cards #34

Closed
jsmolina opened this issue Oct 29, 2022 · 9 comments
Closed

Text mode: not working on CGA cards #34

jsmolina opened this issue Oct 29, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@jsmolina
Copy link

Describe the bug
I would expect that textmode works on CGA mode, but it shows garbled screen intead.

To Reproduce
Steps to reproduce the behavior:

  1. Open any emulator (86box, pcem) or real PCXT.
  2. execute rloader.
  3. See error

Expected behavior
Garblet text is happening

Screenshots
image

Environment

  • Running on: any PCXT
  • OS: any msdos version

Additional context
Add any other context about the problem here.

@marco-sacchi
Copy link
Owner

marco-sacchi commented Oct 29, 2022

Sorry, but I forgot to enter the RLoader version used in the bug report template.

What version are you using?
Do you have the same result with all versions?

I check the correct behavior of RLoader on dosbox and in a VMWare VM, currently I have no real hardware, especially with CGA.

If you think 86box or pcem could be more accurate than dosbox as emulators, please tell me which one you use so I can check what happens.

@mills32
Copy link

mills32 commented Oct 29, 2022

I tested this, it looks like pcem works well when using cga card. If you use tandy, it does not work well.

Dosbox x also fails, in CGA and tandy modes.

Tandy text mode is the same as cga, it should work OK.

I also wanted to ask, can the menu show thumbnail ascii "images" for the text mode?

@marco-sacchi
Copy link
Owner

Thanks @mills32 for testing. I was able to reproduce the problem with doxbox-x version 0.83.12.

@jsmolina, from your screenshot I was unable to guess what could have caused that display since I use the BIOS interrupt 0x10, avoiding direct access to the vram to maximize compatibility between systems and configurations, but checking with a populated list, I got an idea of what it should be.

Since among the data returned by the bios regarding the status of the current video mode there is no number of lines, I was forced to read it directly from the Video Control Data Area 2 ram location (address 0040:0084). Probably the dosbox-x bios and those of some emulators and some real systems apparently do not return the correct value.

I'll check and update you, I need to make Borland C usable from dosbox-x to be able to test my guess. If confirmed I will have to find a safer way to retrieve the number of rows.

@marco-sacchi marco-sacchi self-assigned this Oct 30, 2022
@marco-sacchi marco-sacchi added the bug Something isn't working label Oct 30, 2022
@marco-sacchi
Copy link
Owner

marco-sacchi commented Oct 30, 2022

I remembered that there is the DEBUG command in dosbox-x, and I was able to confirm what I had guessed:

                        +---- Number of Rows on the Screen (Minus 1), Byte
                        v
0040:0080  1E 00 3E 00 00 08 00 00-00 00 00 00 00 00 00 00 ..>.............
0040:0090  00 00 00 00 00 00 10 12-00 00 00 00 00 00 00 00 ................
0040:00A0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0040:00B0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0040:00C0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0040:00D0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0040:00E0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0040:00F0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

As you can see at 0040:0084 there is a 00, instead it should be 24 (for 25 line text modes).

I also found that:

This byte is only used by the EGA and PGA to hold the number of rows minus 1 in the current display mode

Reading the documentation I hadn't noticed this.

marco-sacchi added a commit that referenced this issue Oct 30, 2022
@marco-sacchi
Copy link
Owner

marco-sacchi commented Oct 30, 2022

@jsmolina, @mills32, from the tests done with dosbox-x now RLoader works correctly even on CGA mono and composite, tandy, pcjr, amstrad, mcga, mda machines.

cga_mono
tandy

Let me know if it solved also for the other emulators (downloading the release 1.0.4) in order to close the issue.

@mills32 about ascii "images" thumbnails, I had already thought about it, but it means downscaling the thumbnails by about 8x, from a resolution of 320 x H to 40 x (H / 2) (H / 2 is due to the aspect ratio of the characters cells, which among other things can be variable).

If you think that normally the text-mode interface is used in low-end machines, it would be more of a waste of computing power than anything else, making RLoader less responsive.

In addition, the image becomes completely unrecognizable:
graphics
image

text
image

@mills32
Copy link

mills32 commented Oct 30, 2022

Thanks!.

I wanted to use this for a project, but maybe it is too big for me. Anyway it helped a lot, and also it is great that it is now working for cga, tandy and mda.

About ascii "images" you are right, They will be slow for old pcs like 8088s, and it is difficult to generate them, even if they are simple logos or shapes.

@jsmolina
Copy link
Author

wow impressive!!! lot of thanks, should we close then this issue?

@jsmolina
Copy link
Author

jsmolina commented Oct 30, 2022

@marco-sacchi not sure if you will find it useful, but I created an automatic list generator using python
https://github.com/jsmolina/simple-menu-dos-launcher/blob/main/rloadergen.py

Example usage:
python3 rloadergen.py -i /Users/jsmolina/DIST/GAMES1 -i /Users/jsmolina/DIST/GAMES2 -o /Users/jsmolina/OUT -d c:\menu

it takes a list of directories with long names, and generates dos directories + LIST.txt automatically.

@marco-sacchi
Copy link
Owner

@jsmolina, the list generator can be interesting, I'll be looking at it next weekend.

Please start a discussion next time, instead of adding a post to an open issue. I am the only maintainer and I have specifically activated the "Discussions" section to keep the list of issues clean, and to more easily reach users who want to propose new ideas and features.

If you can't start a discussion just let me know, I'll check the permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants