Oricutron with serial port emulation
Re: Oricutron with serial port emulation
Congrats, barnsey123!
Nice work, it's playable and fun. Thanks for your effort.
Else, I can confirm DSK is not working, but TAP is perfect.
Nice work, it's playable and fun. Thanks for your effort.
Else, I can confirm DSK is not working, but TAP is perfect.
- Hialmar
- Flight Lieutenant
- Posts: 349
- Joined: Tue Mar 04, 2014 11:25 am
- Location: Toulouse, France
- Contact:
Re: Oricutron with serial port emulation
I have just updated the modem emulation code so that it works with IPv6.
I use getaddrinfo which has known problems in MinGW.
Solutions are given here and I will add this to the wiki :
http://programmingrants.blogspot.fr/200 ... ce-to.html
Edit: I will try to compile under Linux and Windows this evening.
I have no ways of compiling/testing under AOS4 and other such platforms.
I use getaddrinfo which has known problems in MinGW.
Solutions are given here and I will add this to the wiki :
http://programmingrants.blogspot.fr/200 ... ce-to.html
Edit: I will try to compile under Linux and Windows this evening.
I have no ways of compiling/testing under AOS4 and other such platforms.
Re: Oricutron with serial port emulation
I tested with Linux and everything looks fine . Thanks for update.
- Hialmar
- Flight Lieutenant
- Posts: 349
- Joined: Tue Mar 04, 2014 11:25 am
- Location: Toulouse, France
- Contact:
Re: Oricutron with serial port emulation
I tested on Windows and had to correct a few bugs but it works now.
- coco.oric
- Squad Leader
- Posts: 720
- Joined: Tue Aug 11, 2009 9:50 am
- Location: North of France
- Contact:
Re: Oricutron with serial port emulation
Hellohere is HNEFATAFL ONLINE v0.6 which has been tested on Oricutron Rev:626 on Win7 x64.
Where is oricutron winx with serial update, i've find v616M without the serial function
Didier
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
Historic owner of Oric, Apple II, Atari ST, Amiga
- Hialmar
- Flight Lieutenant
- Posts: 349
- Joined: Tue Mar 04, 2014 11:25 am
- Location: Toulouse, France
- Contact:
Re: Oricutron with serial port emulation
I haven't posted the WIP version yet.
You need to compile it from the sources.
I'll try to make the WIP this evening.
You need to compile it from the sources.
I'll try to make the WIP this evening.
- barnsey123
- Flight Lieutenant
- Posts: 379
- Joined: Fri Mar 18, 2011 10:04 am
- Location: Birmingham
Re: Oricutron with serial port emulation
BTW, HNEFATAFL-ONLINE still only works with oricutron using the TAP image.
I've installed latest oricutron (rev 634) and although the serial modem is ticked the DISK image still hangs.
There is no difference between the images (it's been TAP2DSK'ed) so I don't know what's happening.
Could there be some sort of conflict when using the serial port and the disk drive? Is it an oricutron thing?
I've installed latest oricutron (rev 634) and although the serial modem is ticked the DISK image still hangs.
There is no difference between the images (it's been TAP2DSK'ed) so I don't know what's happening.
Could there be some sort of conflict when using the serial port and the disk drive? Is it an oricutron thing?
- Hialmar
- Flight Lieutenant
- Posts: 349
- Joined: Tue Mar 04, 2014 11:25 am
- Location: Toulouse, France
- Contact:
Re: Oricutron with serial port emulation
It's not a problem of Oricutron with Disk drive and Modem emulator because this works well with Modem.dsk (Vagelis Blathras terminal program).
No idea why it doesn't work with your tap2dsk version.
I've checked with the debugger breaking on the modem functions and your client program breaks before that while the server program hangs before entering any modem functions either.
No idea what could happen.
No idea why it doesn't work with your tap2dsk version.
I've checked with the debugger breaking on the modem functions and your client program breaks before that while the server program hangs before entering any modem functions either.
No idea what could happen.
Re: Oricutron with serial port emulation
Unitialized memory perhaps?
The memory state is definitely different when loading from the standard BASIC vs from Sedoric.
The memory state is definitely different when loading from the standard BASIC vs from Sedoric.
Re: Oricutron with serial port emulation
I checked TeaForTwo converted to DSK and it hangs exactly as HNEFATAFL-ONLINE disk version.
Then checked the comm routines and didn't found anything suspicious.
Fortunately, I found a workaround - when building in osdk_build.bat use:
%OSDKBIN%\tap2dsk.exe -i"!QUIT:!HNEFATAFL" BUILD\HNEFATAFL-ONLINE.TAP HNEFATAFL-ONLINE.DSK
I'm not sure where is the real problem but first '!QUIT' then start the file - works
Maybe someone more familiar with Oric DOS will explain?
Then checked the comm routines and didn't found anything suspicious.
Fortunately, I found a workaround - when building in osdk_build.bat use:
%OSDKBIN%\tap2dsk.exe -i"!QUIT:!HNEFATAFL" BUILD\HNEFATAFL-ONLINE.TAP HNEFATAFL-ONLINE.DSK
I'm not sure where is the real problem but first '!QUIT' then start the file - works
Maybe someone more familiar with Oric DOS will explain?
- barnsey123
- Flight Lieutenant
- Posts: 379
- Joined: Fri Mar 18, 2011 10:04 am
- Location: Birmingham
Re: Oricutron with serial port emulation
Yup, QUIT works. I'd just started trawling through the code looking for something stupid so you've saved me some work there. Thanks.
Here's what QUIT does:
Looked at "talk.c" which is the additional comms stuff and can't see any use of page 4 but I don't fully understand it...
Er...must make sense to someone...
talk.c
Here's what QUIT does:
.QUIT
Resets the pointers used by the DOS, resetting the IRQ and NMI
vectors. Disables the FUNCTion keys, and makes the use of "!"
obligatory for DOS commands.
The instruction is necessary before running any program that
uses Page 4 of memory or modifies the IRQ/NMI vectors itself
Looked at "talk.c" which is the additional comms stuff and can't see any use of page 4 but I don't fully understand it...
Er...must make sense to someone...
talk.c
Code: Select all
#include "stdlib.h"
#include "oric.h"
unsigned char* ACIA = (unsigned char*)0x31c;
unsigned char* VIA = (unsigned char*)0x300;
extern void irq_handler(void);
extern char* clockptr;
extern char started;
unsigned char buffer[256];
unsigned char hundredths=100;
unsigned char put_ptr, get_ptr;
my_handler() {
if (ACIA[1]&0x80) {
if (ACIA[1]&8) buffer[put_ptr++]=ACIA[0];
} else if ((VIA[13]&0x40) && started) {
hundredths--;
if (hundredths==0) {
hundredths=100;
if (clockptr[3]-- == '0') {
clockptr[3]='9';
if (clockptr[2]-- == '0') {
clockptr[2]='5';
if (clockptr[0]-- == '0') {
clockptr[0]='9';
ping();
}
}
}
}
}
}
char receive_char(void) {
if (put_ptr!=get_ptr) return buffer[get_ptr++];
else return -1;
}
char wait_char(void) {
while (put_ptr==get_ptr);
return buffer[get_ptr++];
}
void send_char(char c) {
while(!(ACIA[1]&0x10));
ACIA[0]=c;
}
int carrier_detect() {
return (ACIA[1]&0x20)==0;
}
void set_dtr() {
ACIA[2]=ACIA[2]&0xFE | 1;
}
void init_comm() {
chain_irq_handler(my_handler);
ACIA[3]=0x3E; /* 9600 baud, 1 stop bit, 7 data bits */
ACIA[2]=0x68; /* even parity, DTR=0, RTS=1 */
}
void end_comm() {
ACIA[2]=0x60;
}
Re: Oricutron with serial port emulation
Here without a working version of Oricutron and serial port emulation and without more data about the symptoms it is difficult to say what could happen.
I tested your program, however, on my version of Oricutron and found something that might ring bells to someone.
In my case your game hangs when asking for SERVER/CLIENT role. A little debugging brought that it hangs while issuing the getchar(), which is a simple:
This routine in $023b simply issues a JMP to the ROM routine GTORKB in EB78 when no disk is present, but this is not the case when it is. Here it is jumping to $045b which is an indirection to some OS routine (anyone has documentation about these routines?). In the end it calls GTORKB which reads the byte at $02df which should contain the pressed key along with the Z flag set to 1 if it is 'valid'. It seems that it never gets a valid key (always 0).
If you force the read to the ascii value of 1, the program continues...
I am not sure why, but if I try to set a breakpoint at the IRQ handler at $0244 it never stops. I tried different approaches (even poking back $eb78 into the jmp at $023b) and none worked. I cannot tell what is going on: the CPU keeps waiting for a keypress. Is that the symptom you are experiencing or is it due to the fact that I am not using a version of Oricutron which supports serial port emulation?
In any case, you are issuing an init_comm at the beginning (which adds your IRQ handler routine to deal with the communication). Maybe you can wait to call that until the user has configured everything correctly (just to test)?
EDIT: I posted something completely irrelevant after the comments about the !QUIT workaround. I even did not care to read the new post warning when pressing Submit. I shall burn in hell... Sorry.
I tested your program, however, on my version of Oricutron and found something that might ring bells to someone.
In my case your game hangs when asking for SERVER/CLIENT role. A little debugging brought that it hangs while issuing the getchar(), which is a simple:
Code: Select all
loop
jsr $023b
bpl loop
If you force the read to the ascii value of 1, the program continues...
I am not sure why, but if I try to set a breakpoint at the IRQ handler at $0244 it never stops. I tried different approaches (even poking back $eb78 into the jmp at $023b) and none worked. I cannot tell what is going on: the CPU keeps waiting for a keypress. Is that the symptom you are experiencing or is it due to the fact that I am not using a version of Oricutron which supports serial port emulation?
In any case, you are issuing an init_comm at the beginning (which adds your IRQ handler routine to deal with the communication). Maybe you can wait to call that until the user has configured everything correctly (just to test)?
EDIT: I posted something completely irrelevant after the comments about the !QUIT workaround. I even did not care to read the new post warning when pressing Submit. I shall burn in hell... Sorry.
- Hialmar
- Flight Lieutenant
- Posts: 349
- Joined: Tue Mar 04, 2014 11:25 am
- Location: Toulouse, France
- Contact:
Re: Oricutron with serial port emulation
Just a note that I have posted new WIP binaries for Windows and OS X on Peter's website :
http://www.petergordon.org.uk/oricutron/
If there is any problem with those please drop me a PM.
http://www.petergordon.org.uk/oricutron/
If there is any problem with those please drop me a PM.
Re: Oricutron with serial port emulation
This disk file works only on Telestrat emulation, right?iss wrote: * awesome Vagelis Blathras terminal program (info) and (download).
Re: Oricutron with serial port emulation
It works in Atmos mode. After boot select #31C as base address.