J.B.-san's Z80ctrl and Z80ram card combined problem

241 views
Skip to first unread message

zugan2

unread,
May 25, 2025, 11:28:14 AM5/25/25
to RC2014-Z80
Hi, there.
I'm just back in again to RC2014 world now with 5 years blank.
At that time I hoped I would like to make MSX emulate machine with RC2014.

But unfortunately my work was getting busy therefore I couldn't continue
my project.

Until now I have J.B. Langston-san's Z80ctrl, TMS9918vidoo card and YM2149 sound card.
I'm now assembling J.B.-san's Z80ram card which is for Z80ctrl but unfortunately some
problem had happen.

It works almost fine, hello.hex is OK, and boot CPM2.DSK works.
But when I run MBASIC, it doesn't return message.

I guess some memory bank problem had happen, so I test the boards with survey.com.
Then it returns lower 32K bank is OK (shows tttttt)but regarding upper 32K bank shows
rrrr (maybe not recognized).

I'd like to attach photos.
Maybe the firmware for Z80ctrl AVR1284 is too old to support Z80ram bank management or something like that. (firmware hush number is efc8e38)
The bus board is SC112 6slot 80pins.

Could someone help me to solve this problem ?

Best regards, zugan2.
IMG_2058.JPG
IMG_2050.JPG

zugan2

unread,
May 25, 2025, 11:38:00 AM5/25/25
to RC2014-Z80
I'm sorry, attached photos were inadequate.
I'd like to attach photos again.
IMG_2040.JPG
IMG_2056.JPG
IMG_2044.JPG
IMG_2036.JPG
IMG_2039.JPG

zugan2

unread,
May 29, 2025, 10:33:10 AM5/29/25
to RC2014-Z80
Hi, there.
I've solved the problem by myself with X's grok AI advice.
I have been using TL866II to flash ATMEGA1284P CPU.
At that time I can skip to use for mightyCore bootloader for Arduino IDE.
I used avr-gcc-3.7.0 to compile firmware for Z80ctrl REV4 and Z80ram, but it caused somehow
strange state, therefore I used the firmware that J.B. Langston-san made from HackaDay link.
That is z80ctrl-REV4-b825d1a.hex.
https://hackaday.io/project/158338-z80ctrl

Hackaday 2025-05-29 230504.png

After I've got hex files and flash the ATMEGA1284P CPU, It works!!
Now, Upper 32kb also available..
Many thanks to J.B. Langston-san !!
Z80ctrl_REV4-b825_ 2025-05-29 230202.png
MBASIC also works fine !

MBASIC 2025-05-29 230420.png

Now I can remind many things forgot from 2019 to 2020, therefore I'd like to ask everyone in RC2014 world to help me again!

Best regards,
Zugan2

zugan2

unread,
May 30, 2025, 2:57:34 AM5/30/25
to RC2014-Z80
Dear, J.B. Langston-san or everyone who is familiar with this Z80ctrl.
I have a question about firmware compile.
When I use the z80ctrl-REV4-b825d1a.hex on Hackaday, it works.
But unfortunately compile the firmware from github below, it doesn't work.
https://github.com/jblang/z80ctrl/tree/master/firmware

My AVR-toolchain is now avr-gcc-14.1.0, and I tried old avr-gcc-3.7.0, too.
There were git access error when I was downloaded zip.
(git.Fatal error that it couldn't found hash value from git)
git error ト 2025-05-30 151441.png
Then I helped with GROK AI, he said it should be downloaded from Git Bash then clone it.
git rev-parse --short HEAD shows Git hash value "d1d8e71".
git_clone 2025-05-30 151836.png

Then, I've tried compile with makefile using avr-gcc-14.1.0.
Unfortunately on bash, just make clean had finished, but make
was filed with message"make: don't know how to make %.c".

Therefore, after that I complied with normal windows command prompt.
This time, the git clone folders are marked with git mark so no git error occurred.
(Don't forget to change makefile shown below for Z80ram and Z80ctrl setups)

# Hardware revision (Important: must be set to correct value)
BOARD_REV?=4
# Bank address for z80ctrl-style banked RAM; comment out to disable support
 BANK_PORT=0x78
# Uncomment to enable DS1302 RTC support (used on CPU/RAM/RTC board)
 DS1302_RTC=1
# SD Card Adapter - Set set 1 for the AdaFruit adapter, leave commented out for the Polulu adapter.
 SD_CARD_ADAFRUIT = 1

git holder 2025-05-30 152416.png


It finished compile and flash hexdata to ATMEGA1284P with TL866II parallel programmer.

This time It started up with (d1d8e71) hash value.

RESET ERROR Z80 2025-05-30 154124.png
But result was same, loadhex hello.hex and run 100, it replies "breaking due to reset signal".
And boot CPM2.DSK, it also display "breaking due to reset signal".

What is the problem on this Z80ctrl firmware ?
Beside z80ctrl-REV4-b825d1a.hex works fine,  I want to change peripheral IO address or so,
I'd really like to compile the changed firmware with different parameters.

Your advise is highly appreciated,
Best regards,
Zugan2

zugan2

unread,
May 31, 2025, 12:21:40 PM5/31/25
to RC2014-Z80
Hi,there.
Thanks for supporting this RC2014 community.
I have digged this problem a little far today.
Actually I'm not familiar with Git, therefore I use Grok AI in the "X".

I'll summarize the situation.
 
1. Old z80ctrl-REV4-b825d1a.hex is OK 
2. Latest ctrl-REV4-d1d8e71.hex is not OK 
Therefore I suspected that the software had degraded along the way. 
(Only for board REV4)

This need GIT handling on PC, therefore I entered cmd prompt, then open bash.
bash is something like LINUX embironment on windows PC.
The procedure is shown below.
 
1.Clone a new repository to start from the latest commit:
cd D:\ 
cd z80ctrl_new

2.Trace Backwards to Find Degredation
List commits from latest (d1d8e71) to past:  (-n 20 is list number)git log --oneline -n 20
Git clone2 2025-06-01 003310.png


Checkout a Known Working Commit (b825d1a):
  • Switch to b825d1a (known to work without breaking due to reset signal):
git checkout b825d1a

git ver 2025-06-01 002521.png


Fix Makefile and Compile:
  • Edit firmware/Makefile to set the board revision:
# Hardware revision (Important: must be set to correct value) BOARD_REV?=4 # Bank address for z80ctrl-style banked RAM; comment out to disable support BANK_PORT?=0x78
Compile the firmware:
cd firmware make clean make

git error ト 2025-05-30 151441.png

Test:
fill 0 ffff 0 loadhex hello.hex run 100
  • Latest commit: d1d8e71 Get rid of serial bus links.
  • Two commits before (2394ac0 Add Xmodem prompt back) resulted in a different error.
  • Twenty commits before (6773d58 Combine RD/WR and IORQ/MREQ I/O direction for speed) worked fine.
  • Confirmed degredation occurred between 6773d58 and 2394ac0.

Z80CTRL 6773d58 ト 2025-06-01 002615.png

I tested only on REV4 board.
I hope this investigation will help someone else.

Best regards,
Zugan2

J.B. Langston

unread,
Jun 5, 2025, 9:10:25 PM6/5/25
to RC2014-Z80
Hi Zugan,

I have a REV4 board still but I haven't tested the new software on it lately. The latest commits were tested on my REV6 board. If I have time this weekend I will see if I can reproduce the issue you saw and figure out what the problem is.

Thanks,
J.B.

zugan2

unread,
Jun 10, 2025, 11:12:10 AM6/10/25
to RC2014-Z80
HI, J.B.Lang-san

Thank you very much for your respond.
Long time no see !
I know your real work is busy,
I don't care  you couldn't check this issue recently.

Best regards,
Zugan2
Reply all
Reply to author
Forward
0 new messages