Poster | Thread |
pjhutch
|  |
Epson driver for AmigaOS 4.1 Posted on 27-Oct-2022 17:57:18
| | [ #1 ] |
|
|
 |
Regular Member  |
Joined: 13-May-2003 Posts: 191
From: W Yorkshire, UK | | |
|
| I am trying to develop an Epson driver for AmigaOS 4. Since the original drivers use init.asm and printertag.asm in 68k assembly, I am trying to combine them into one init.c file which can be compiled for the PPC. It compiles but when I select the driver in the Printer prefs, it complains and says 'Unable to open printer device' and fails. It may be to do with PEDData (PrinterExtendedData) structure or something else. Any one got any pointers whuch it can be? _________________ Peter J Hutchison http://www.pjhutchison.org/ |
|
Status: Offline |
|
|
NutsAboutAmiga
|  |
Re: Epson driver for AmigaOS 4.1 Posted on 27-Oct-2022 18:44:38
| | [ #2 ] |
|
|
 |
Elite Member  |
Joined: 9-Jun-2004 Posts: 12392
From: Norway | | |
|
| @pjhutch
Do you have a github repo?
A device is basically a library, with slightly different init code. so you generate lib skeleton with the idltool.
if you want open the device from 68k you need to also have stubs, that translate the 68K JMP (D0/D7-A0/A7) call into PPC calls (gpr0-gpr31).
Of course you can include 68k code in your C code, if you convert into a binary and include as byte array, that work nice for pc relative code, for, absolute jmp/jsr, etc, you need read hunk header, and do the magic, on byte array, before calling any of it.
You need to execute with emulate function call, you can’t execute it directly, on other hand other why kind can, using 68k emulation trap instruction, with that you execute PPC rutines, from 68k code, se the stub file as a example.
Another why is likely more efficient, is converting 68k asm into macros, and unions, that worked for me, bit of work however, and easy make mistakes. Last edited by NutsAboutAmiga on 27-Oct-2022 at 07:02 PM. Last edited by NutsAboutAmiga on 27-Oct-2022 at 06:59 PM. Last edited by NutsAboutAmiga on 27-Oct-2022 at 06:55 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
pjhutch
|  |
Re: Epson driver for AmigaOS 4.1 Posted on 27-Oct-2022 21:58:30
| | [ #3 ] |
|
|
 |
Regular Member  |
Joined: 13-May-2003 Posts: 191
From: W Yorkshire, UK | | |
|
| @NutsAboutAmiga
I want to avoid using any 68k code in it. I suspected it is similar to a library but I have not written or compiled a shared library. I have seen some other source code for libraries e.g. a52_lib on os4depot but I wasn't sure what bits apply to a device and what doesn't e.g., does it need its own Library structure ( I haven't seen that on other printer drives), and what is needed to use the idttool for a driver?
I have found some source code on os4depot.net - HP_Deskjet_CMYK.lha which has the information I need!
Looks like the bit missing is the PrinterSegment structure which contains the old PED (PrinterExtendedData) structure. First print test of text seems to work... :)
Last edited by pjhutch on 28-Oct-2022 at 04:19 PM. Last edited by pjhutch on 28-Oct-2022 at 08:42 AM.
_________________ Peter J Hutchison http://www.pjhutchison.org/ |
|
Status: Offline |
|
|
NutsAboutAmiga
|  |
Re: Epson driver for AmigaOS 4.1 Posted on 28-Oct-2022 22:43:47
| | [ #4 ] |
|
|
 |
Elite Member  |
Joined: 9-Jun-2004 Posts: 12392
From: Norway | | |
|
| |
Status: Offline |
|
|
pjhutch
|  |
Re: Epson driver for AmigaOS 4.1 Posted on 30-Oct-2022 18:16:19
| | [ #5 ] |
|
|
 |
Regular Member  |
Joined: 13-May-2003 Posts: 191
From: W Yorkshire, UK | | |
|
| |
Status: Offline |
|
|
duga
|  |
Re: Epson driver for AmigaOS 4.1 Posted on 30-Oct-2022 21:21:18
| | [ #6 ] |
|
|
 |
Regular Member  |
Joined: 1-May-2012 Posts: 223
From: Unknown | | |
|
| @pjhutch
Cool, good job.
Only Brother here unfortunately.
_________________ Aros Retrofit |
|
Status: Offline |
|
|
Hypex
 |  |
Re: Epson driver for AmigaOS 4.1 Posted on 31-Oct-2022 11:28:01
| | [ #7 ] |
|
|
 |
Elite Member  |
Joined: 6-May-2007 Posts: 10924
From: Greensborough, Australia | | |
|
| @pjhutch
I was going to suggest the OS4Depot driver. |
|
Status: Offline |
|
|