| Author |
Message |
Eric R. Quinn
Joined: 18 Sep 1999
Posts: 493
Location: Portland, Oregon USA
|
| SDSC Debug Console Revision |
 |
Posted: Wed Jun 23, 2004 6:30 pm |
|
|
All,
I'd like to make a revision to the SDSC Debug Console specification.
The problem is that the debug console ports ($FC and $FD) are in the joystick port range (which is $C0 through $FF). Devices using ports in this range need to have the joystick ports disabled first. (I believe this is required for FM sound?) I'm recommending that the SDSC Debug Console spec be updated to include this requirement.
Also, it is not specified whether the SDSC Debug Console ports are write-only or read/write. I believe that should be specified as well.
Please let me know your thoughts.
--
Eric R. Quinn
|
|
| Back to top |
|
 |
Martin
Guest
|
| Re: SDSC Debug Console Revision |
 |
Posted: Wed Jun 23, 2004 9:51 pm |
|
|
| Quote:
|
> I'd like to make a revision to the SDSC Debug Console specification.
> The problem is that the debug console ports ($FC and $FD) are in the joystick port range (which is $C0 through $FF). Devices using ports in this range need to have the joystick ports disabled first. (I believe this is required for FM sound?) I'm recommending that the SDSC Debug Console spec be updated to include this requirement.
|
Yeah :)
| Quote:
|
> Also, it is not specified whether the SDSC Debug Console ports are write-only or read/write. I believe that should be specified as well.
|
Hmm, I think they're write-only.
Those are not big changes, so I can easily add them.
|
|
| Back to top |
|
 |
Bock
Site Admin
Joined: 08 Jul 2001
Posts: 4901
Location: Kyoto, Japan
|
| SDSC Debug Console Tester |
 |
Posted: Thu Jun 24, 2004 12:40 am |
|
|
Not exactly replying to your original post, but I'm considering adding SDSC Debug Console in MEKA, and I was wondering if you have already-made testing code for it, in the form of a SMS/GG binary.
|
|
| Back to top |
|
 |
Bock
Site Admin
Joined: 08 Jul 2001
Posts: 4901
Location: Kyoto, Japan
|
| Format display question |
 |
Posted: Thu Jun 24, 2004 12:51 am |
|
|
- Any specific reason for 'a' to be used to display an ASCII character, instead of 'c' as in a standard C library?
- Could 's' (for zero-terminated string) be added?
Not all games works with zero-terminated strings, but it can be useful in various cases. The parameter would be a pointer to the string in Z80 memory space.
|
|
| Back to top |
|
 |
Eric R. Quinn
Joined: 18 Sep 1999
Posts: 493
Location: Portland, Oregon USA
|
| Re: Format display question |
 |
Posted: Thu Jun 24, 2004 2:41 am |
|
|
| Quote:
|
>
> - Any specific reason for 'a' to be used to display an ASCII
> character, instead of 'c' as in a standard C library?
|
Not that I'm aware of. I'm not sure we should change the spec for that, though, unless you feel strongly about it. Martin, do you care to comment?
| Quote:
|
> - Could 's' (for zero-terminated string) be added?
> Not all games works with zero-terminated strings, but it can
> be useful in various cases. The parameter would be a pointer
> to the string in Z80 memory space.
|
Well, we thought of that, but strings can be output directly to the data port. A simple loop can be used to output a zero-terminated string to the data port. We didn't think that a format specifier for strings added that much functionality.
Either way, it's not a big deal to me, but maybe Martin will comment since he's the only one who's actually implemented the full spec.
--
Eric R. Quinn
|
|
| Back to top |
|
 |
Eric R. Quinn
Joined: 18 Sep 1999
Posts: 493
Location: Portland, Oregon USA
|
| Re: SDSC Debug Console Tester |
 |
Posted: Thu Jun 24, 2004 2:44 am |
|
|
| Quote:
|
> Not exactly replying to your original post, but I'm
> considering adding SDSC Debug Console in MEKA, and I was
> wondering if you have already-made testing code for it, in
> the form of a SMS/GG binary.
|
I'm working on a test. Right now it only tests basic stuff like cursor movement, scrolling, LINEFEED, CARRIAGERETURN and the CLEARSCREEN command. I can probably send it along to you now, but I plan on improving it a bit more for testing MesaDX.
--
Eric R. Quinn
|
|
| Back to top |
|
 |
Martin
Guest
|
| Re: Format display question |
 |
Posted: Thu Jun 24, 2004 8:26 am |
|
|
| Quote:
|
> >
> > - Any specific reason for 'a' to be used to display an ASCII
> > character, instead of 'c' as in a standard C library?
> Not that I'm aware of. I'm not sure we should change the spec for that, though, unless you feel strongly about it. Martin, do you care to comment?
|
Hmm. I don't think it's that important to have it exactly like in C, as it is different anyway :) I really don't know what's better, we could also use both.
I just saw I've written:
'%'[width][format][data type][parameter]
But the [ ] characters are usually for something optional. Shouldn't it be changed to
'%'[width]
, with only the width as optional?
| Quote:
|
> > - Could 's' (for zero-terminated string) be added?
> > Not all games works with zero-terminated strings, but it can
> > be useful in various cases. The parameter would be a pointer
> > to the string in Z80 memory space.
> Well, we thought of that, but strings can be output directly to the data port. A simple loop can be used to output a zero-terminated string to the data port. We didn't think that a format specifier for strings added that much functionality.
> Either way, it's not a big deal to me, but maybe Martin will comment since he's the only one who's actually implemented the full spec.
|
Yes, it wouldn't add much functionality, but I think it would make it easier and nicer. I'd like to add it.
|
|
| Back to top |
|
 |
Martin
Guest
|
| Re: Format display question |
 |
Posted: Thu Jun 24, 2004 8:28 am |
|
|
That one didn't work because of HTML xD
But you know what I mean :)
|
|
| Back to top |
|
 |
Eric R. Quinn
Joined: 18 Sep 1999
Posts: 493
Location: Portland, Oregon USA
|
| Re: Format display question |
 |
Posted: Thu Jun 24, 2004 1:09 pm |
|
|
| Quote:
|
> I just saw I've written:
> '%'[width][format][data type][parameter]
> But the [ ] characters are usually for something optional. Shouldn't it be changed to
|
| Quote:
|
> , with only the width as optional?
|
Good idea.
Also, the width specifier is in decimal (ASCII), but is limited to 256. This means the debug console has to parse up to a 3 digit number. Should we just change the width specifier to a single binary byte? That would make parsing a little easier.
| Quote:
|
> > > - Could 's' (for zero-terminated string) be added?
> > > Not all games works with zero-terminated strings, but it can
> > > be useful in various cases. The parameter would be a pointer
> > > to the string in Z80 memory space.
> Yes, it wouldn't add much functionality, but I think it would
> make it easier and nicer. I'd like to add it.
|
O.k.
Here's a summary of fixes for the SDSC Console Spec:
1.) Re-write format specifier to use brackets for width.
2.) Add 's' (zero-terminated string) format specifier
3.) Specify ports as write-only.
4.) Specify that joystick ports must be disabled via port $3E before the SDSC Debug Console ports are accessible.
5.) ?? Replace 'a' format specifier with 'c' or just use both?
--
Eric R. Quinn
|
|
| Back to top |
|
 |
Eric R. Quinn
Joined: 18 Sep 1999
Posts: 493
Location: Portland, Oregon USA
|
| Re: Format display question |
 |
Posted: Thu Jun 24, 2004 1:52 pm |
|
|
| Quote:
|
> Also, the width specifier is in decimal (ASCII), but is
> limited to 256. This means the debug console has to parse up
> to a 3 digit number. Should we just change the width
> specifier to a single binary byte? That would make parsing a
> little easier.
|
Oops. Doing the above would mean that the width specifier would be required, since there is no way for the parser to distinguish between a width specifier of 0x64 characters versus no width specifier and a 'd' format specifier.
Forget I mentioned it.
--
Eric R. Quinn
|
|
| Back to top |
|
 |
Martin
Guest
|
| Re: Format display question |
 |
Posted: Thu Jun 24, 2004 5:33 pm |
|
|
| Quote:
|
> Also, the width specifier is in decimal (ASCII), but is limited to 256. This means the debug console has to parse up to a 3 digit number. Should we just change the width specifier to a single binary byte? That would make parsing a little easier.
|
It's not that hard :)
I could post my implementation if you want.
|
|
| Back to top |
|
 |
|