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

Add Bios INT 12h to report installed memory size. #562

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

JorisVanEijden
Copy link
Contributor

Description of Changes

Add Bios INT 12h to report installed memory size.

Rationale behind Changes

#212 mentioned a game using it and we didn't have it yet.

@maximilien-noal
Copy link
Member

maximilien-noal commented Jan 22, 2024

This is exactly the kind of code that has been piling up in fix/detroit. I approve !

Lots of small DOS / BIOS interrupt handlers are missing, and this is one of them.

(Dune is a very relaxed game on that front :D )

@@ -200,7 +205,9 @@ public sealed class Machine : IDisposable, IDebuggableComponent {
Memory.UInt16[0xF000, 0xFFF0] = 0xF4;
}
IoPortDispatcher = ioPortDispatcher;
BiosDataArea = new BiosDataArea(Memory);
BiosDataArea = new BiosDataArea(Memory) {
MemSizeKb = (ushort)Math.Clamp(Memory.Ram.Size / 1024, 0, 1024) // max 1mb.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is not supposed to include ram above 640k
http://www.techhelpmanual.com/184-int_12h__conventional_memory_size.html
0x280

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.
My source only said to use other interrupts for memory above 1mb. 640K makes more sense.

@kevinferrare kevinferrare merged commit de0094b into OpenRakis:master Jan 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants