Home » RBC Forums » General Discussion » Recompiling bios for the sbc-188
Recompiling bios for the sbc-188 [message #9968] |
Wed, 15 June 2022 11:53  |
oldefool
Messages: 6 Registered: June 2022
|
Junior Member |
|
|
I am trying to figure out how to compile the bios for my sbc-188 v3 board,
the source files contain many .asm files amongst others.
I have made a couple of changes to the config.asm file and so
need to re compile all the needed files to one .bin file
I have NASM, but don`t know what to do with the MAKEFILE
Any help would be great.
Anybody?
Colin
|
|
|
|
|
Re: Recompiling bios for the sbc-188 [message #9978 is a reply to message #9974] |
Mon, 20 June 2022 02:48   |
 |
microbit
Messages: 18 Registered: June 2022 Location: Melbourne
|
Junior Member |
|
|
Hey Colin,
I'm like you, I prefer working in an IDE.
However, it would be a big job to port the SBC-188 BIOS into that IDE.
This is what I did on my WIN10 machine :
Installed Watcom 1.9 using the first step on this URL :
https://www.thoughtco.com/install-open-watcom-c-candand-comp iler-958451
I installed 1.9, the win32 exe file, for specific reasons I forgot.
When it prompts you for a choice between registry, env variables etc I opted for environment variable setup.
It should install to C:\Watcom. Best not to modify that because the BIOS build relies on that path.
I installed NASM using this file :
nasm-2.15.05-installer-x64.exe
(you might need the 32 bit version, this was my URL :
https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/ 
After installing both, you should be able to go to the directory where you unzipped source_3.5 (from "DOS" command prompt)
and type "make". It should build the entire thing.
Notes/gotchas :
Don't modify settings from the cfg files, they don't affect the build, they are templates.
Modify in config.asm
Don't try to change the settings 32 etc for BIOS and chip size, the make build automatically generates the 32k, 64k and 128k BIN files.
If you try to modify the whole thing goes apeshit. This isn't documented very obvious.
(which is understandable, guess anyone that just freely changes things without knowing what it does, doesn't get the keys
Make sure you add the path to NASM in your WIN path (environment variables.
Watcom did it for you, no need there.
That's it, let me know how you went.
73, Kris
PS : here's a log of my build, used "new" here, to be sure.
C:\Firmware\SBC-188\source_3.5>new
C:\Firmware\SBC-188\source_3.5>wmake clean
Open Watcom Make Version 1.9
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
echo foo >foo.err
echo foo >foo.lst
echo foo >fpem/foo.lst
echo foo >foo.map
del *.lst
del *.map
del *.err
del fpem\*.lst
echo foo >foo.bin
echo foo >foo.obj
echo foo >fpem\foo.obj
echo foo >foo.exe
echo foo >foo.sys
echo foo >foo.hex
echo foo >xbios.lib
del *.bin
del *.obj
del fpem\*.obj
del *.exe
del *.sys
del ?bios.lib
del *.hex
C:\Firmware\SBC-188\source_3.5>wmake all
Open Watcom Make Version 1.9
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -f bin -l emm4mem.lst -o emm4mem.sys emm4mem.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o copyrght.obj -l copyrght.lst copyrght.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o rbios.obj -l rbios.lst rbios.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o floppy.obj -l floppy.lst floppy.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o int10ser.obj -l int10ser.lst int10ser.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o int16ser.obj -l int16ser.lst int16ser.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o misc15.obj -l misc15.lst misc15.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o ide.obj -l ide.lst ide.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o mfpic.obj -l mfpic.lst mfpic.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o timers.obj -l timers.lst timers.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o inttrace.obj -l inttrace.lst inttrace.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o tests.obj -l tests.lst tests.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o font.obj -l font.lst font.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o ppide.obj -l ppide.lst ppide.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o dide.obj -l dide.lst dide.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o diskio.obj -l diskio.lst diskio.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o sdcard.obj -l sdcard.lst sdcard.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o ide8.obj -l ide8.lst ide8.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o idelib.obj -l idelib.lst idelib.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o int14ser.obj -l int14ser.lst int14ser.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o int17par.obj -l int17par.lst int17par.asm
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f obj -o redbug.obj -l redbug.lst redbug.asm
cd fpem
wmake em187.obj
Open Watcom Make Version 1.9
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
nasm -s -DLONG -f obj -O6+ -l em187.lst -o em187.obj em187.asm
em187.asm: info: assembly required 1+3+2 passes
cd ..
wlib -q -n abios.lib +floppy.obj +int10ser.obj +int14ser.obj +int16ser.obj +int17par.obj +misc15.obj +ide.obj +mfpic.obj
wlib -q abios.lib +timers.obj +inttrace.obj +tests.obj +font.obj +ppide.obj +dide.obj +sdcard.obj
wlib -q abios.lib +ide8.obj +diskio.obj +idelib.obj +redbug.obj +fpem/em187.obj +unasm/unasm.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=cprintf.obj cprintf.c
wdis -l -s cprintf.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=sio.obj sio.c
wdis -l -s sio.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=nvram.obj nvram.c
wdis -l -s nvram.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=strtoul.obj strtoul.c
wdis -l -s strtoul.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=libc.obj libc.c
wdis -l -s libc.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=debug.obj debug.c
wdis -l -s debug.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=kbd.obj kbd.c
wdis -l -s kbd.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=m8563lib.obj m8563lib.c
wdis -l -s m8563lib.obj
wcl -c -q -mc -zdp -zu -s -zp1 -oi -os -1 -fpi87 -DSBC188=3 -DROM=32 -DCHIP=64 -fo=vga3lib.obj vga3lib.c
wdis -l -s vga3lib.obj
wlib -q -n cbios.lib +cprintf.obj +sio.obj +nvram.obj +libc.obj +strtoul.obj +debug.obj
wlib -q cbios.lib +m8563lib.obj +vga3lib.obj +kbd.obj
wcl -lr -q -k1024 -fe=rbios.exe -fm=rbios.map copyrght.obj rbios.obj abios.lib cbios.lib
Warning! W1014: stack segment not found
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f bin -o startup.bin -l startup.lst startup.asm
tools\exe2rom.exe rbios.exe rbios.bin -s startup.bin -r 32 -e 64
ROM=32 EPROM=64 StartUpFile="startup.bin"
EXEfile="rbios.exe" EPROMfile="rbios.bin"
Relocation constant 0F800h
tools\bin2hex.exe -o rbios.hex rbios.bin
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f bin -o tbasic.bin -l tbasic.lst tbasic.asm
tools\bin2hex.exe -o tbasic.hex tbasic.bin
nasm -DHAS_FASTCALL=1 -O9 -DSBC188=3 -DROM=32 -DCHIP=64 -f bin -o font.bin -l font.lst font.asm
tools\bin2hex.exe -o font.hex font.bin
wcl -lr -q -k1024 -fe=em187.exe -fm=em187.map fpem\em187.obj
Warning! W1014: stack segment not found
Warning! W1023: no starting address found, using 0000:0000
tools\exe2rom.exe em187.exe em187.bin -s NUL -r 32K -e 32K
ROM=32 EPROM=32 StartUpFile="NUL"
EXEfile="em187.exe" EPROMfile="em187.bin"
Relocation constant 0F800h
tools\bin2hex.exe -o em187.hex em187.bin
tools\hex2bin.exe -o bios064.bin -R64K rbios.hex tbasic.hex -d26K font.hex -d18k em187.hex
tools\hex2bin.exe -R 64K -o space64.bin
copy/b space64.bin + bios064.bin bios128.bin
space64.bin
bios064.bin
1 file(s) copied.
copy/b space64.bin + space64.bin + bios128.bin bios256.bin
space64.bin
space64.bin
bios128.bin
1 file(s) copied.
|
|
|
|
Re: Recompiling bios for the sbc-188 [message #9983 is a reply to message #9979] |
Wed, 22 June 2022 15:42   |
oldefool
Messages: 6 Registered: June 2022
|
Junior Member |
|
|
Hi Kriss
Sorry for the late responce, been getting the sbc-188 closer to working,
not quite there yet.
I tried the instrucrions you gave,
I did`nt bother with my XP machine as the world no longer wants to talk to it
since Google does`nt support XP and other web sites only use newer versions ( just one of my gripes! )
I just went straight for the Win 10 operation and,
IT WORKED!!!
Thanks ever so much.
In order to see if the .bin files it created actuslly work, I need to get the board up and running better.
I have had to use all the components as specified in the BOM, though this was`nt the way I wanted to go
as I have a bunch of 128Kb Ram chips lying around.
But the board does work, of sorts!
This is what I get when reset:-
( The first time it boots it counts memory, complains that NVRAM is invalid
I have to set time / date etc. etc. )
[22;24;37;40;25m[2J[01;01H[?25h[?7lVideo BIOS (C) 2010 Sergey Kiselev
Detected 16550C UART, FIFO is enabled
SSS BBBBB CCC 1 888 888
S S B B C C 11 8 8 8 8
S B B C 1 8 8 8 8
S BBBB C HHHH 1 888 888
S B B C 1 8 8 8 8 rev. 3.5-1
S S B B C C 1 8 8 8 8 of 29-Apr-2021
SSS BBBBB CCC 11111 888 888 (ANSI)
Copyright (C) 2010-2020 by The RetroBrew Users' Group. All rights reserved.
Provided for hobbyist use on the RetroBrew SBC-188 board. All code may be
used under the terms of the GNU General Public License, a copy of which
is contained in the file COPYING in the top-level source directory.
This BIOS copy was built at 12:01:15 PST on 2021-04-29. [55]
15 Mhz CPU clock, 640K memory installed
P.O.S.T. of memory BYPASSED
Press 's' to run NVRAM setup...
Floppy A: type 4
PPI=0 IDE8=0 DISKIO=0 MFPIC=0 DIDE0=0 DIDE1=0 DSD=0 Units=0 bdisk=00
Fixed_Disk_Tab1: 00 00 00 00
Fixed_Disk_Tab2: 00 00 00 00
Now initializing floppy
Trying to boot from drive A: OK
Starting MS-DOS...
A:\>ver
MS-DOS Version 6.22
A:\>
I have a CF card plugged into a IDE adapter which I know works as on my Amstrad 80386sx pc
but cannot get it to boot, I have tried all manner of combinations, but again I am stuck!
All I get is different values shown for `Fixed_Disk_Tab1:` and for Tab2.
and then it hangs.
Oh, and it is plugged in directly next to the Floppy drive slot by the way,
any ideas?
Once I get this one under my belt, I can get on building some add on cards of my own,
but I have never used the ECB format, only ISA. But that`s for another day!
BTW I live in England so I suppose messages will alway be out of sync!!
Best regards.
Colin.
( G7IAW )
...73
PS. I noticed in the preview that the `SBC-188` logo does`nt show poperly
I`m new to forums and unsure how to format the message correctly. I`ll get there!
|
|
|
|
Re: Recompiling bios for the sbc-188 [message #9987 is a reply to message #9984] |
Sat, 25 June 2022 05:45   |
oldefool
Messages: 6 Registered: June 2022
|
Junior Member |
|
|
Hi Kriss
So far everything has gone OK.
I plugged the `IDE -> CF card` into the slot marked P801,
lifted pin 10 of ic U704 (74LS05), I switched on and:-
[22;24;37;40;25m[2J[01;01H[?25h[?7lVideo BIOS (C) 2010 Sergey Kiselev
Detected 16550C UART, FIFO is enabled
SSS BBBBB CCC 1 888 888
S S B B C C 11 8 8 8 8
S B B C 1 8 8 8 8
S BBBB C HHHH 1 888 888
S B B C 1 8 8 8 8 rev. 3.5-1
S S B B C C 1 8 8 8 8 of 29-Apr-2021
SSS BBBBB CCC 11111 888 888 (ANSI)
Copyright (C) 2010-2020 by The RetroBrew Users' Group. All rights reserved.
Provided for hobbyist use on the RetroBrew SBC-188 board. All code may be
used under the terms of the GNU General Public License, a copy of which
is contained in the file COPYING in the top-level source directory.
This BIOS copy was built at 12:01:15 PST on 2021-04-29. [55]
15 Mhz CPU clock, 640K memory installed
P.O.S.T. of memory BYPASSED
Press 's' to run NVRAM setup...
Floppy A: type 4
PPI=1 IDE8=0 DISKIO=0 MFPIC=0 DIDE0=0 DIDE1=0 DSD=0 Units=1 bdisk=01
Fixed_Disk_Tab1: 02 00 00 00
Fixed_Disk_Tab2: 02 00 00 00
PPIDE fixed disk C: (0x80)
Model: ATP COMPACT FLASH
Serial: AF CF 26E28CF8
Firmware: 20121024
Geometry: 991:16:63 with LBA support
Current: 991:16:63 capacity: 998928
LBA Sectors: 998928 (48-bit): 0x000000000
Now initializing floppy
Trying to boot from drive A: Disk read failed AX=8500
Trying to boot from drive C: OK
HIMEM: DOS XMS Driver, Version 3.07 - 02/14/92
Extended Memory Specification (XMS) Version 3.0
Copyright 1988-1992 Microsoft Corp.
ERROR: HIMEM.SYS requires an 80x86-based machine.
XMS Driver not installed.
CON code page driver cannot be initialized
HMA not available : Loading DOS low
C>rem C:\WINDOWS\SMARTDRV.EXE
C>rem 'C:\WINDOWS\mouse.COM /Y
Code page operation not supported on this device
Device error during select
C:\>dir
Volume in drive C is 512MB
Volume Serial Number is 4012-14F0
Directory of C:\
COMMAND COM 47845 11/11/91 5:00
TIM BAT 32 01/01/80 21:42
BAS <DIR> 03/05/20 13:20
BIPBOP2 <DIR> 03/05/20 13:20
DOS <DIR> 03/05/20 13:20
EASYPC <DIR> 03/05/20 13:20
GP <DIR> 03/05/20 13:20
HC <DIR> 03/05/20 13:20
LEMMINGS <DIR> 03/05/20 13:20
MAHJONGG <DIR> 03/05/20 13:20
PRINCE <DIR> 03/05/20 13:20
PROCOMM <DIR> 03/05/20 13:20
QB <DIR> 03/05/20 13:20
SM <DIR> 03/05/20 13:21
TC <DIR> 03/05/20 13:21
TIM <DIR> 03/05/20 13:21
VGA <DIR> 03/05/20 13:21
WINDOWS <DIR> 03/05/20 13:21
QB INI 34 01/01/88 0:12
AUTOEXEC BAT 324 01/01/88 0:08
BIPBOP BAT 73 27/02/88 18:53
PROCOMM BAT 31 28/08/02 10:51
ASM <DIR> 03/05/20 13:21
WIN BAT 17 01/01/88 1:32
CONFIG SYS 325 01/01/88 0:04
WINA20 386 9349 09/04/91 5:00
26 file(s) 58030 bytes
478109696 bytes free
C:\>mem
654336 bytes total conventional memory
655360 bytes available to MS-DOS
562544 largest executable program size
C:\>ver
MS-DOS Version 5.00
C:\>chkdsk
Volume 512MB created 03/05/2020 13:13
Volume Serial Number is 4012-14F0
510631936 bytes total disk space
98304 bytes in 4 hidden files
221184 bytes in 27 directories
32202752 bytes in 966 user files
478109696 bytes available on disk
8192 bytes in each allocation unit
62333 total allocation units on disk
58363 available allocation units on disk
916480 total bytes memory
562544 bytes free
C:\>
Next, I will try a recompiled bios, but I will wait for my Super Cap to arrive first.
I get tired of repeatedly typing in the configuration details every time I switch on!
I used to work for an electronics manufacturer where we made some boards for a customer
( some 200+ each month ). The boards contained an 80188-16 processor
a couple of gal chips, 128k flash rom and 128k ram, a couple of scc`s ( 85c30 ), and lots of i/o`s.
We sat on many duff boards that had been returned, so when we was told to scrap them, I pulled as many chip as I could.
I eventually made a board of my own based loosely ( very loosely ) on their design.
Board N01- was rubbish.
Board N02- great, had lots of fun. learned a great deal.
I literally wore it out with so many mods and changes
Board N03 will be My next project. I have made a couple of ISA cards,
but I wish to integrate them into my next board.
However, if I can adapt them to work with the ECB system as with the SBC-188.
Then, that could save me some work.
" It`s been said before that this sort of stuff just isn`t documented! "
Have a great weekend and thanks again for all your help Kriss.
Best regards
Colin.
( G7IAW ) 73
|
|
|
|
|
|
Re: Recompiling bios for the sbc-188 [message #10860 is a reply to message #10859] |
Tue, 24 December 2024 09:50  |
scruss
Messages: 62 Registered: December 2015 Location: Toronto, Canada
|
Member |

|
|
briano wrote on Mon, 23 December 2024 01:30What is the SBC-188 serial port baud rate on start up?
config.asm (from BIOS version 3.5-1 of 29-Apr-2021 suggests 9600:
; Define the UART startup bit rate - 1200-19200 are most common
;UART_RATE equ 0 ; 1200
;UART_RATE equ 1 ; 2400
;UART_RATE equ 2 ; 4800
UART_RATE equ 3 ; 9600
;UART_RATE equ 4 ; 19200
;UART_RATE equ 5 ; 38400
;UART_RATE equ 6 ; 57600
;UART_RATE equ 7 ; 115200
(can't seem to stop that smiley appearing in the message. I'm not being snarky, it's this board's software being weird)
> Does anyone know what each of the pins on the 6502 CPU chip in the Apple II Plus does?
They all plug into the socket on the motherboard to keep the chip from drifting away. - c.s.a2 FAQ of yore
[Updated on: Tue, 24 December 2024 09:51] Report message to a moderator
|
|
|
Current Time: Sat Feb 08 21:54:51 PST 2025
Total time taken to generate the page: 0.00816 seconds
|