So I'm not super clear on how 65816 / 65265 interrupts work... The monitor itself must use them, right? So if I want to call its functions like put_chr or whatever, all I should have to do is cli in my main() before I do anything, and then it'll use the monitor's handler.
And in fact that seems to ...
Search found 20 matches
- Sun Mar 17, 2019 5:13 pm
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
- Sun Mar 17, 2019 3:39 pm
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
It disables interrupts? That's stupid.
Okay, honestly, a non-interrupt-based version is better for me anyway because I'm going to be writing something that will run without the monitor (and its interrupt handler).
Okay, honestly, a non-interrupt-based version is better for me anyway because I'm going to be writing something that will run without the monitor (and its interrupt handler).
- Sun Mar 17, 2019 3:09 am
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
whartung: been asking myself that for days....
All I can figure is that it's related to IRQHandler. That's the symbol, along with main(), that c0.obj (WDC's init code) references that I have to supply. I'd love to have the sample C project that WDC claims comes with their tools...
All I can figure is that it's related to IRQHandler. That's the symbol, along with main(), that c0.obj (WDC's init code) references that I have to supply. I'd love to have the sample C project that WDC claims comes with their tools...
- Sun Mar 17, 2019 1:22 am
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
That's really what I was hoping, but I couldn't find any examples of anyone having written those routines for the 265, or figure it out myself. 
- Sun Mar 17, 2019 12:54 am
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
That was you? I've been relying heavily on that guide, I was going to submit a PR to it detailing, basically, how to make printf() work. Only I kept not being able to make it work.
I haven't used the 816 at all (or anything 6502 but this in fact, I've messed with Z80s and AVR microcontrollers but ...
I haven't used the 816 at all (or anything 6502 but this in fact, I've messed with Z80s and AVR microcontrollers but ...
- Sun Mar 17, 2019 12:38 am
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
Oh man, thank you so much, that's the first piece of example C code for this thing I've seen, and it worked!
I had to modify it a little bit, their compiler still doesn't link anything without me defining an IRQHandler function, but since that code doesn't use the IRQ handler (which I guess the ...
I had to modify it a little bit, their compiler still doesn't link anything without me defining an IRQHandler function, but since that code doesn't use the IRQ handler (which I guess the ...
- Sat Mar 16, 2019 10:57 pm
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
I'm sorry, I don't know enough yet to understand what that code is doing. What are UIFR, UART, and ARTD0?
- Sat Mar 16, 2019 9:55 pm
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
I don't have anything for a handshake, my entire code is above. I'm trying to use the USB serial thing hooked to the monitor ROM.
So if that interrupt handler is supposed to empty it, maybe the problem is that I'm implementing IRQHandler with an empty function. But I can't find anywhere what's ...
So if that interrupt handler is supposed to empty it, maybe the problem is that I'm implementing IRQHandler with an empty function. But I can't find anywhere what's ...
- Sat Mar 16, 2019 7:29 pm
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
And I spoke too soon. I replaced my monitor_putchar code with this: void monitor_putchar(char ch) {
asm {
lda %%ch
send_loop: jsl $00:e063
bcs send_loop
}
}
And now I have the exact same problem I had when using put_chr: try to output more than 9, and it outputs nothing. Output 9 or fewer, and ...
asm {
lda %%ch
send_loop: jsl $00:e063
bcs send_loop
}
}
And now I have the exact same problem I had when using put_chr: try to output more than 9, and it outputs nothing. Output 9 or fewer, and ...
- Sat Mar 16, 2019 7:10 pm
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
Re: WC65C265SXB Monitor ROM problems
whartung: Sorry, I didn't explain this well. In your example I wouldn't see anything, no As or B. If you remove the B then I'd see nine As. And yes, the monitor can print as many characters as it wants. In fact if I make a program that prints nine characters I can run it over and over again without ...
- Sat Mar 16, 2019 6:00 am
- Forum: Programming
- Topic: WC65C265SXB Monitor ROM problems
- Replies: 26
- Views: 2350
WC65C265SXB Monitor ROM problems
I finally figured out how to get the C compiler working but I've hit another weird problem. I have the following code: void monitor_putchar(char ch);
void main() {
const char *str = "\nHello there\n";
int n;
for(n = 0; n < 5; n++)
monitor_putchar(str[n]);
}
void monitor_putchar(char ch ...
void main() {
const char *str = "\nHello there\n";
int n;
for(n = 0; n < 5; n++)
monitor_putchar(str[n]);
}
void monitor_putchar(char ch ...
- Thu Mar 14, 2019 11:55 pm
- Forum: Newbies
- Topic: Trying to figure out tho WDC C compiler
- Replies: 20
- Views: 3790
Re: Trying to figure out tho WDC C compiler
Which is exactly what I'm doing now, but it would be nice if they told you that, maybe along with a #define you can do to enable monitor-outputting versions.
- Thu Mar 14, 2019 6:40 pm
- Forum: Newbies
- Topic: Trying to figure out tho WDC C compiler
- Replies: 20
- Views: 3790
Re: Trying to figure out tho WDC C compiler
The memory model thing is probably why you have to manually tell it what to link against. There are five copies of the std lib, one for each memory model and (I guess?) one for the 6502.
And it makes sense that fcntl.h would have no implementation, it would just be nice if the manual would TELL you ...
And it makes sense that fcntl.h would have no implementation, it would just be nice if the manual would TELL you ...
- Thu Mar 14, 2019 6:17 pm
- Forum: Newbies
- Topic: Trying to figure out tho WDC C compiler
- Replies: 20
- Views: 3790
Re: Trying to figure out tho WDC C compiler
I think I might have figured this out, no thanks to the manual: wdclib -s shows me that all the C library functions are in the whatever.lib files, and if I add those to the linker then it finds them and complains that some other things are missing: __unlink, __close, __isatty, __write, __lseek. But ...
- Thu Mar 14, 2019 5:41 pm
- Forum: Newbies
- Topic: Trying to figure out tho WDC C compiler
- Replies: 20
- Views: 3790
Re: Trying to figure out tho WDC C compiler
Although to be fair it does compile and link things that don't use the standard library. As long as I'm willing to reimplement all that stuff myself (or find an open source one) I can use it.