Review request: ppislots.com

Pagina 1/3
| 2 | 3

Door user888

Expert (66)

afbeelding van user888

04-03-2017, 13:42

Hi,

I created a tool to show the configuration of the 8255 PPI to see which page points to which slot. Can somebody check if it works correctly as it shows a different output then doing from basic:

PRINT RIGHT$("0000000"+BIN$(INP(&HA8)),8)
11110000

Tool can be found here:
git clone https://bitbucket.org/conveniencedev/ppislots.git
Precompiled version is in the /bin directory

Aangemeld of registreer om reacties te plaatsen

Van Louthrax

Prophet (2083)

afbeelding van Louthrax

04-03-2017, 15:45

When you're in BASIC the BIOS is in place at 0000-3FFF and 4000-7FFF. You have RAM at these locations in DOS, so the results must be different. Weird thing here is that you have different slots while in DOS (usually the RAM slot is that same for all visible RAM in DOS, but that might depend on your configuration, for example if you have 32KB main RAM and an extra 32KB RAM expansion cartridge...).

Van user888

Expert (66)

afbeelding van user888

04-03-2017, 17:26

I'm running OneChipMSX it on a Altera DE1. Would that explain it?

Van Louthrax

Prophet (2083)

afbeelding van Louthrax

04-03-2017, 18:12

I think the OneChipMSX models all have RAM in a single same slot (you can type "MEMORY" at the MSX-DOS prompt to check that if you're under Nextor).

Van mars2000you

Enlighted (5513)

afbeelding van mars2000you

04-03-2017, 18:42

Louthrax wrote:

I think the OneChipMSX models all have RAM in a single same slot.

It's In slot 3-0.

Van user888

Expert (66)

afbeelding van user888

04-03-2017, 23:35

So I would expect to see a 3 for all locations, right? That means inp(0xa8); in C returns something different than inp(&ha8) in Basic...

Van Louthrax

Prophet (2083)

afbeelding van Louthrax

04-03-2017, 23:43

Yep, should be 3 for all slots in your case.

Van mars2000you

Enlighted (5513)

afbeelding van mars2000you

05-03-2017, 00:51

Not 3, but 3-0

Configuration of OneChipMSX is as following:

Slot 0-0: BIOS+BASIC
Slot 0-1: Kanji driver (only if upgraded to MSX2+)
Slot 0-2: MSX-MUSIC Bios
Slot 0-3: X-Basic (only if upgraded to MSX2+)

Slot 3-0: RAM
Slot 3-1: Extended bios
Slot 3-2: Special version of DOS 2.3 for Mega-SD
Slot 3-3: IPL rom

+ I/O Kanji rom 128kB

Van Louthrax

Prophet (2083)

afbeelding van Louthrax

05-03-2017, 01:21

mars2000you wrote:

Not 3, but 3-0

Slowly, he's just using register A8 and displaying main slots for now, the joys of the subslots will come later Smile

Van Louthrax

Prophet (2083)

afbeelding van Louthrax

05-03-2017, 02:49

user888, I had a quick look at your code, I think it's better to use "unsigned char" when doing shift operations. Also your "inb" functions does not seem to access the Z80 ports ?

Van user888

Expert (66)

afbeelding van user888

05-03-2017, 11:04

Thanks for the answers.

Regarding unsigned vs signed char: default is unsigned with SDCC 3.6 and later, see http://sdcc.sourceforge.net/mediawiki/index.php/SDCC_3.6.0_R.... But of course it's good practice for portability's sake to make it more explicit.

Regarding subslots: will look into it. I'm doing this exercise to learn more from slots/subslots behaviour.

But, the real reason for I see the strange slot configuration is this:

char inb(char param) {
      return 'a';
}

... which I added in the beginning to make it compile, and forgot about it later :-) My punishment to not start test-driven. I will see if I can find a high-level inp() function, otherwise I will add one in inline assembler.

Pagina 1/3
| 2 | 3