UART support

The Uzebox now have a fully functional emulator! Download and discuss it here.
User avatar
danboid
Posts: 265
Joined: Sun Jun 14, 2020 12:14 am

Re: UART support

Post by danboid » Sun Sep 04, 2022 5:07 pm

Artcfox:

Great! I can confirm your cuzebox Linux whisper console patch works. I can now print stuff to the cuzebox console! This will be a huge help in making progress with my long stalled Combat (tanks) remake.

Will you submit this as a PR to the cuzebox repo or do you want me to do it? It may not be worthwhile if Jubatian isn't around to merge it. The same applies to the main UB repo. I hope he's OK!

https://github.com/Jubatian/cuzebox/issues/6

User avatar
danboid
Posts: 265
Joined: Sun Jun 14, 2020 12:14 am

Re: UART support

Post by danboid » Tue Sep 06, 2022 7:20 pm

I've added these simple debug functions to IKD:

Code: Select all

void cuzeboxCOut(char str[]);
void cuzeboxHOut(int num);

// cuzeboxCOut() is used to print debug strings to the cuzebox console.
void cuzeboxCOut(char str[]) {
  for (int i = 0; str[i] != '\0'; i++) {
        _SFR_IO8(0X1a)=str[i];
  }
  _SFR_IO8(0X1a)='\n'; // Add newline after last character
}

// cuzeboxHOut() is used to print a hex value to the cuzebox console.
// eg cuzeboxHOut(GetTile(2,8));
void cuzeboxHOut(int num) {
  _SFR_IO8(25)=num;
  _SFR_IO8(0X1a)='\n'; // Add newline
}

User avatar
Artcfox
Posts: 1083
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: UART support

Post by Artcfox » Mon Sep 19, 2022 10:40 pm

A while back I had asked Jubatian if he wanted to add whisper console support to cuzebox, but I don't think he wanted to, but you have it working, so that's great!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest