Skip to content

Commit

Permalink
PS2INFO Update & OpenSpin Conversion
Browse files Browse the repository at this point in the history
- Added support for Duodyne to PS2INFO application.
- Switched all build paths to consistently use OpenSpin since it appears to be compatible with all build environments supported by RomWBW.
  • Loading branch information
wwarthen committed Oct 24, 2023
1 parent 29f93fb commit 1e5b38c
Show file tree
Hide file tree
Showing 61 changed files with 15,526 additions and 86 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ diff:
$(MAKE) --directory Source diff

dist:
$(MAKE) ROM_PLATFORM=dist 2>&1 | tee make.log
$(MAKE) ROM_PLATFORM=dist
$(MAKE) --directory Source clean
$(MAKE) --directory Tools clean

distlog:
$(MAKE) dist 2>&1 | tee make.log
36 changes: 26 additions & 10 deletions Source/Apps/Test/ps2info/ps2info.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@
; keyboard, and mouse.
;
; WBW 2022-03-28: Add menu driven port selection
; Add support for RHYOPHYRE
; Add support for Rhyophyre
; WBW 2022-04-01: Add menu for test functions
; WBW 2022-04-02: Fix prtchr register saving/recovery
; WBW 2023-10-19: Add support for Duodyne
;
;=======================================================================
;
; PS/2 Keyboard/Mouse controller port addresses (adjust as needed)
;
; MBC:
; Nhyodyne:
iocmd_mbc .equ $E3 ; PS/2 controller command port address
iodat_mbc .equ $E2 ; PS/2 controller data port address
; RPH:
; Rhyophyre:
iocmd_rph .equ $8D ; PS/2 controller command port address
iodat_rph .equ $8C ; PS/2 controller data port address
; Duodyne:
iocmd_duo .equ $4D ; PS/2 controller command port address
iodat_duo .equ $4C ; PS/2 controller data port address
;
cpumhz .equ 8 ; for time delay calculations (not critical)
;
Expand Down Expand Up @@ -77,10 +81,12 @@ setup1:
jr z,setup1
call upcase
call prtchr
cp '1' ; MBC
cp '1' ; Nhyodyne
jr z,setup_mbc
cp '2' ; RHYOPHYRE
cp '2' ; Rhyophyre
jr z,setup_rph
cp '3' ; Duodyne
jr z,setup_duo
cp 'X'
jr z,exit
jr setup
Expand All @@ -101,6 +107,14 @@ setup_rph:
ld de,str_rph
jr setup2
;
setup_duo:
ld a,iocmd_duo
ld (iocmd),a
ld a,iodat_duo
ld (iodat),a
ld de,str_duo
jr setup2
;
setup2:
call prtstr
call crlf2
Expand Down Expand Up @@ -1344,14 +1358,16 @@ delay1:
; Constants
;=======================================================================
;
str_banner .db "PS/2 Keyboard/Mouse Information v0.6a, 2-Apr-2022",0
str_banner .db "PS/2 Keyboard/Mouse Information v0.7, 19-Oct-2023",0
str_hwmenu .db "PS/2 Controller Port Options:\r\n\r\n"
.db " 1 - MBC\r\n"
.db " 2 - RHYOPHYRE\r\n"
.db " 1 - Nhyodyne\r\n"
.db " 2 - Rhyophyre\r\n"
.db " 3 - Duodyne\r\n"
.db " X - Exit Application\r\n"
.db "\r\nSelection? ",0
str_mbc .db "MBC",0
str_rph .db "RHYOPHYRE",0
str_mbc .db "Nhyodyne",0
str_rph .db "Rhyophyre",0
str_duo .db "Duodyne",0
str_menu .db "PS/2 Testing Options:\r\n\r\n"
.db " C - Test PS/2 Controller\r\n"
.db " K - Test PS/2 Keyboard\r\n"
Expand Down
27 changes: 0 additions & 27 deletions Source/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
#
# order is actually important, because of build dependencies
#
BUILDPROP := 1
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
# Inhibit building Propeller on unsupported
# Linux host architectures such as ARM eg. Raspberry Pi
BUILDPROP := 0
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
BUILDPROP := 1
endif
ifeq ($(ARCH), i686)
BUILDPROP := 1
endif
ifeq ($(ARCH), i386)
BUILDPROP := 1
endif
ifeq ($(ARCH), x86)
BUILDPROP := 1
endif
# Add here any more supported x86 based
# uname machine strings for building Propeller
endif

.PHONY: doc prop shared bp images rom zrc zzrcc

Expand All @@ -32,11 +10,7 @@ doc:
$(MAKE) --directory Doc $(ACTION)

prop:
ifeq ($(BUILDPROP), 1)
$(MAKE) --directory Prop $(ACTION)
else
$(info Builing Propeller is not supported on this $(ARCH) host Linux OS)
endif

shared:
$(MAKE) --directory HDIAG $(ACTION)
Expand Down Expand Up @@ -70,7 +44,6 @@ zrc:
zzrcc:
$(MAKE) --directory ZZRCC $(ACTION)


clean: ACTION=clean

clean: all
Expand Down
14 changes: 7 additions & 7 deletions Source/Prop/Build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ setlocal

set TOOLS=../../Tools

set PATH=%TOOLS%\bst;%PATH%
set PATH=%TOOLS%\OpenSpin;%PATH%

call :bstc PropIO
call :bstc PropIO2
call :bstc ParPortProp
call :openspin PropIO
call :openspin PropIO2
call :openspin ParPortProp

goto :eof

:bstc
:openspin
echo.
echo Building %1...
bstc Spin\%1 -e -l || exit /b
move /Y %1.eeprom "..\..\Binary" || exit /b
openspin -e Spin\%1.spin || exit /b
move /Y Spin\%1.eeprom "..\..\Binary" || exit /b
goto :eof
4 changes: 2 additions & 2 deletions Source/Prop/Clean.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
setlocal

if exist *.eeprom del *.eeprom
if exist *.list del *.list
if exist Spin\*.eeprom del Spin\*.eeprom
if exist Spin\*.list del Spin\*.list
2 changes: 1 addition & 1 deletion Source/ver.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#DEFINE RMN 4
#DEFINE RUP 0
#DEFINE RTP 0
#DEFINE BIOSVER "3.4.0-dev.12"
#DEFINE BIOSVER "3.4.0-dev.14"
#define rmj RMJ
#define rmn RMN
#define rup RUP
Expand Down
2 changes: 1 addition & 1 deletion Source/ver.lib
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ rmn equ 4
rup equ 0
rtp equ 0
biosver macro
db "3.4.0-dev.12"
db "3.4.0-dev.14"
endm
12 changes: 0 additions & 12 deletions Tools/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export CPMDIR80=$(TOOLS)/cpm/
TASM=$(BINDIR)/uz80as -t z80
TASMFLAGS=
OPENSPIN=$(BINDIR)/openspin
BSTC=$(BINDIR)//bstc
CPMCP=$(BINDIR)/cpmcp
CPMCHATTR=$(BINDIR)/cpmchattr

Expand Down Expand Up @@ -115,19 +114,8 @@ CPM=$(TOOLS)/cpm/bin80/
%.com: %.rel
$(ZXCC) $(CPM)/L80 -$(basename $<),$(basename $<).com/n/e

ifeq ($(UNAME), Linux)
%.eeprom: %.spin
$(BSTC) -e -l $<
endif

#
# darwin bstc won't run, since mac os does not do 32 bit binaries any more
# openspin ought to work
#
ifeq ($(UNAME), Darwin)
%.eeprom: %.spin
$(OPENSPIN) -e $<
endif

#
# first target is default
Expand Down
Binary file added Tools/OpenSpin/openspin.exe
Binary file not shown.
Binary file removed Tools/bst/bst_manual_0.04.pdf
Binary file not shown.
Binary file removed Tools/bst/bstc.exe
Binary file not shown.
Binary file removed Tools/bst/bstl.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Tools/unix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ifeq ($(UNAME), Darwin)
SUFFIX=osx
endif

SUBDIRS = bst uz80as zxcc cpmtools bin2asm lzsa
SUBDIRS = OpenSpin uz80as zxcc cpmtools bin2asm lzsa

all:
@chmod +x casefn.sh
Expand Down
5 changes: 5 additions & 0 deletions Tools/unix/OpenSpin/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: c
os:
- linux
- osx
script: make
68 changes: 68 additions & 0 deletions Tools/unix/OpenSpin/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# modified for RomWBW build environment

UNAME := $(shell uname)
DEST = ../../$(UNAME)

# cross compilation scheme taken from Eric Smith's spin2cpp compiler
# if CROSS is defined, we are building a cross compiler
# possible targets are: win32, rpi

ifeq ($(CC),)
CC=gcc
endif

ifeq ($(CXX),)
CXX=g++
endif

ifeq ($(CROSS),win32)
CC=i686-w64-mingw32-gcc
CXX=i686-w64-mingw32-g++
EXT=.exe
BUILD=./build-win32
else ifeq ($(CROSS),rpi)
CC=arm-linux-gnueabihf-gcc
CXX=arm-linux-gnueabihf-g++
EXT=
BUILD=./build-rpi
else
EXT=
BUILD=./build
endif

OS:=$(shell uname)

ifeq ($(OS),Darwin)
CFLAGS+=-Wall -g -Wno-self-assign
else
CFLAGS+=-Wall -g $(MSTATIC)
endif

CXXFLAGS += $(CFLAGS)

TARGET=$(BUILD)/openspin$(EXT)
SRCDIR=SpinSource
OBJ=$(BUILD)/openspin.o \
$(BUILD)/pathentry.o

LIBNAME=$(BUILD)/PropellerCompiler/libopenspin.a

all: $(BUILD) $(DEST) $(LIBNAME) $(OBJ) Makefile
$(CXX) -o $(TARGET) $(CXXFLAGS) $(OBJ) $(LIBNAME)
cp -p $(TARGET) $(DEST)

$(BUILD)/%.o: $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<

$(LIBNAME): $(BUILD)
$(MAKE) -C PropellerCompiler CROSS=$(CROSS) BUILD=$(realpath $(BUILD))/PropellerCompiler all

$(BUILD):
mkdir -p $(BUILD)

$(DEST):
mkdir -p $(DEST)

clean:
rm -rf $(BUILD)
make -C PropellerCompiler BUILD=$(realpath $(BUILD))/PropellerCompiler clean
Loading

0 comments on commit 1e5b38c

Please sign in to comment.