Robotron BIC A5105

Discussion about other targets
Post Reply
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Robotron BIC A5105

Post by RobertK »

Until now this target had only been mentioned in the appmake thread so I'm starting a new topic.

Recently a BIC A5105 owner (Cornelius) contacted me and informed me that my programs Mastermind RK and Elite Planet Browser do not work on the real hardware, although they run in the JKCEmu emulator. So I let him try smaller z88dk-generated test programs, and all of them worked, so does Cross Chase. The reason is that z88dk uses the same wrong memory mapping that is currently implemented the JKCEmu emulator (see issue 1), which makes larger programs crash.

Here are some details that Cornelius sent me, he is in contact with the auther of the JKCEmu emulator (Jens) and with a former developer of the BIC. The most important fact: the BIC A5105 is basically an MSX computer, only with a different graphics chip (NEC PD7200).

We have three issues / ToDos for this target:

1. Memory mapping: the BIC's special memory structure needs to be taken care of, otherwise the program will overwrite parts of the operating system (or vice versa).
The memory mapping should be identical to the one of the MSX.
In the docs of the BIC OS Part 2 (bc_scp2.pdf)...
https://www.dropbox.com/sh/n9m98x655lq9 ... CeJba?dl=0
...on page 62 the memory structure can be seen.

Cornelius had a problem with one of his programs (a PT3 player, not z88dk-related) where exactly this problem made his program crash when loading song files greater than 7K in size. Here is that discussion on the Robotron forum:
https://www.robotrontechnik.de/html/for ... abacb3b88b

What makes everything more difficult is that the JKCEmu currently (0.9.8.2) uses a wrong memory mapping for the BIC system, so we can't test the results in the emulator, but Cornelius can do the testing on the real hardware. The emulator developer (Jens) is currently too busy to further improve his emulator, he even didn't find the time to fix the Z9001 program loading bug (which he is aware of).

I don't know if it would make sense to add a compiler switch for supporting the old (wrong) memory format - if it's not worth the effort, then people can use an older version of z88dk to compile for JKCEmu until it gets fixed.


2. Sound
The BIC has an AY 3-8910 sound chip with exactly the same commands as on the MSX, the only difference being: register 7 must be negated. Otherwise all the information here...
https://www.msx.org/wiki/SOUND
...is valid for the BIC too.

The optional additional sound card doubles the sound capabilities, both can be used in games for playing music and sound effects simultaneously. For addressing the internal sound chip, the adresses A0-A2 must be used, while the sound card is on 38.

Sound output can be tested in the JKCEmu emulator, but be aware that an output device must be selected (Menu "Audio/Kassette" -> "Sound-Generator" -> "Ausgabegerät" -> choose an option there).

In case that it could help, here is a sample BASIC program (Cornelius's PT3-Player):
https://www.dropbox.com/s/90xirxseg36gi ... 3.dsk?dl=0
(DSK disk image)
https://www.dropbox.com/s/niile2v1bxlb3 ... 3.rar?dl=0
(.rar package with individual files)

Cornelius also made some videos demonstrating the BIC's sound capabilities:
https://www.youtube.com/@robotronA5105


3. Highres Graphics
Currently it makes no sense to work on that: JKCEmu does not emulate it correctly, mostly because this part of the BIC is hardly documented. Cornelius will provide more information as soon as there has been some progress.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: Robotron BIC A5105

Post by dom »

I am a little confused to be honest as to where the issue is.

We treat the BIC as another CP/M machine, so RAM from 0x100 up-to TPA. However, if I'm reading this post 003 correctly, then a BDOS call can exit with ROM paged into the 0x4000 which results in bad things happening if the call originated from a paged out area which seems like a very bad thing to happen, though we can stick in an interposer to adjust the memory back.

Or, is the problem that the way we start up, the memory is in configuration of bank 1 (with ROM at 0x4000) so we need to create a bootstrap program which fiddles the RAM settings and then loads and executes the rest of the program?

Adding support for the AY chip should be fairly easy, but lets sort out the memory problem first of all.

I think in terms of support, all I added was a couple of text modes for the UPD chip - I remember finding working with it "challenging", but that may have been due to an incomplete emulation.

Edit: Reading further, it looks like the pt player issue was due to the player being on the interrupt and so it's called when ROM is paged in. Which just leaves me more confused as to what the problem is!
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Re: Robotron BIC A5105

Post by RobertK »

Cornelius can't answer your question, but he would like to point you to post 019 which could maybe help, here is my translation:
A few OS routines are located in ROM (system clock, display output, keyboard polling, etc.) and get called regularly. If we want to use our own interrupt sources, we must modify / back up / restore the assignment of the memory segments. The ISR or an auxiliary ISR should always be located in bank (slot) 2 page (segment) 3 -> from C000h, because the area below SCPX does not move. The upper user memory limit is 0E880h."

playpt3.asm:
...
PLAYERSTART: EQU 0D000h ;Address of the player engine
...
SNG_POINT: EQU PROGEND+1
...

PT3_BIC.INC:
...
ISR: DI
LD (SPSV2),SP ;back up stack pointer
LD SP, STACK2 ;local Stack
PUSH IY
PUSH HL
PUSH DE
PUSH BC
PUSH AF
EX AF,AF'
PUSH AF
ld a,(imerk) ;use only every second interrupt
or a ;d.h. 100Hz/2 = 50Hz
jr z,irz0 ;interrupt counter was still 0

;AY program only at every second interrupt
LD A,(PAUSE)
OR A
JR NZ,PAUSE1 ;NO PROGRESS
LD C, 0A8H ;port memory management (SVG)
IN A,(C)
PUSH AF
LD A, 0AAH ;RAM segment 0-3 on slot/bank 2
OUT (C),A

CALL PLAY_Q ;1 PLAY SEGMENT
POP AF
OUT (0A8H),A

xor a
ld (imerk),a ;interrupt counter 0 again
...
If you should have any specific questions, Cornelius can forward them to experts who might be able to answer them.
Post Reply