wwarthen / RomWBW

System Software for Z80/Z180/Z280 Computers
GNU Affero General Public License v3.0
332 stars 98 forks source link

Activity LED on always sc503 with 3.5.0-dev.52 #403

Closed stickbreaker closed 2 months ago

stickbreaker commented 3 months ago

I am just starting to familiarize myself with this project to adapted it to my new board. My board is based on SC503 from Steven Cousins.

I am using his functional board as a test bed for my software additions. I Forked the current 3.5.dev and just ran Clean then Build, choosing the SCZ180 and sc503 options, burnt the Rom and the sc503 now boots with v3.5.0-dev.52 with 2024-07-03.

The single LED activity LED is always on, no change. I wrote a program(turbo pascal :) to bit twiddle the circuit and the circuit is working correctly, my app leaves the LED off when it exits, but by the time the A> is up the LED is back on?

I tried messing with the config file (SCZ180_sc503.asm) Original version:

;
FPLED_ENABLE    .SET    TRUE        ; FP: ENABLES FRONT PANEL LEDS
FPLED_IO    .SET    $A0     ; FP: PORT ADDRESS FOR FP LEDS
FPSW_ENABLE .SET    TRUE        ; FP: ENABLES FRONT PANEL SWITCHES
FPSW_IO     .SET    $A0     ; FP: PORT ADDRESS FOR FP SWITCHES
;
LEDENABLE   .SET    TRUE        ; ENABLE STATUS LED (SINGLE LED)

Changed version

;
FPLED_ENABLE    .SET    FALSE       ; FP: ENABLES FRONT PANEL LEDS
FPLED_IO    .SET    $A0     ; FP: PORT ADDRESS FOR FP LEDS
FPSW_ENABLE .SET    FALSE       ; FP: ENABLES FRONT PANEL SWITCHES
FPSW_IO     .SET    $A0     ; FP: PORT ADDRESS FOR FP SWITCHES
;
LEDENABLE   .SET    TRUE        ; ENABLE STATUS LED (SINGLE LED)
;

The distribution version of 3.4 Dec 2023 works fine.

Chuck

update: 20240704 16:30mdt the problem is between dev.29 and dev.37 I am building and tested each tagged commit on a binary walk Last working version is dev.31 update 17:15MDT The diff between dev.31 and dev.34 mainly show changing usage of DIAG() and PFLEDS() and LED() in HBIO/romldr.asm( the function clrled() is deleted

wwarthen commented 3 months ago

Thank you for reporting this @stickbreaker. There were some changes to the LED handling, so it appears I broke something. It is tricky because of the different LED configurations on different platforms.

I'll take a look at this soon.

Thanks, Wayne

wwarthen commented 3 months ago

Hi @stickbreaker,

I think I see the problem. I don't actually have an SC503, so hoping you could test this for me.

Please add the following line to your SCZ180_sc503.asm file:

LEDMODE     .SET    LEDMODE_STD ; LEDMODE_[STD|SC|RTC|NABU]

Then build a new ROM and try it.

Thanks, Wayne

stickbreaker commented 3 months ago

in progress. added

LEDMODE     .SET    LEDMODE_STD ; LEDMODE_[STD|SC|RTC|NABU]

Yep LEDMODE_STD worked against dev.52

but, the LEDMODE_SC variant failed.

another question Wayne, is there a way to just recompile the ROM without rebuilding all the other stuff?
I tried the BUILD in Source/HBIOS and HBIOS both error out with


============================================================
SCZ180_sc503 for Z180 CPU
============================================================

TASM Z80 Assembler.       Version 3.2 September, 2001.
 Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
set CPUFAM=2
set ROMSIZE=512
set RAMSIZE=512
set ROMDISKSIZE=384
set RAMDISKSIZE=256

..\Fonts\font*.asm
The system cannot find the file specified.
        0 file(s) copied.

Chuck.

wwarthen commented 3 months ago

Hi @stickbreaker.

Yep _LEDMODE_STD worked against dev.52_

Good. As expected.

but, the _LEDMODE_SC_ variant failed.

Yup, that is not the correct setting for SC503.

another question Wayne, is there a way to just recompile the ROM without rebuilding all the other stuff? I tried the BUILD in Source/HBIOS and HBIOS both error out with

Yes. From the Source directory, use "BuildShared" and let that finish. Then you can run "BuildROM" from the Source directory as desired. You do not need to rerun BuildShared each time. Once it is run, you can then use BuildROM repeatedly.

I will commit the fix for the LED in the near future.

Thanks, Wayne

wwarthen commented 2 months ago

I have pushed the fix to the repository in commit b781f16, so closing this issue.

Thanks,

Wayne