tag:blogger.com,1999:blog-22708971512241378112024-03-08T08:02:52.526+03:00DtZ's computer researchExperiments with Z80, MC68008 / 68k, CP/M and arounddtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.comBlogger66125tag:blogger.com,1999:blog-2270897151224137811.post-40931614451981065602037-11-12T14:19:00.000+03:002014-10-06T17:19:34.823+04:00About the projects // О проектах<b>68k project (under construction)</b><br>
Idea:<a href="http://z80xxi.blogspot.ru/2013/10/launching-68k-project.html">here</a><br>
Read by tag:<a href="http://z80xxi.blogspot.ru/search/label/68kavr">68kavr</a><br>
<br>
<b>Z80 project (considered complete, but will be updated sometimes)</b><br>
Idea <a href="http://z80xxi.blogspot.ru/2012/11/the-aim.html"> here </a><br>
Read about Searle Grant's SBC SD interface (and generally CP/M SD implementation) by tag <a href="http://z80xxi.blogspot.ru/search/label/sgsbcsd">sgsbcsd</a><br>
<br/>
Note, that the early records were imported from Livejournal and should be edited by me sometimes later (I bet that will never happen).</br>
Also, some early records may contain some weird letters - that's russian, but it is always translated, do not be afraid.<br/>
Also, sometimes I write about some unrelated (even PC!) but weird hardware, some unrelated but weird network technologies, and some weird things. May be even I'll attempt to write a big post about butterflies. If I ever got interested in butterflies.dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-14146878603485287852022-08-12T16:01:00.005+03:002023-03-03T17:17:09.109+03:00Kchibo KK-9803 old & new versionKchibo KK9803 is known to be an unexpectedly good radio. However, now here is a new DSP ( kt0936 ) version, that is known to be as shitty as shit.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQgNJvcLOGVRdX3IoJQq4c1YCxoxxgD2wyVaYUEs2dIiQfVNHtUWZvguxzKkTAe4u2RkRralXQg7t26jVcmXbGiUSxXcfmTuPnT9AwC3zyuEGj4b8d9kAG4Pe3HgaGYX3B8_bVd3oZgiYiWw5TVTMviwRrhQgHDuaNarEH71PCpdiclxBQV8u8XNBA/s4000/kchibo-1.jpg" style="display: block; padding: 1em 0; text-align: center; clear: left; float: left;"><img alt="" border="0" height="320" data-original-height="4000" data-original-width="3000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQgNJvcLOGVRdX3IoJQq4c1YCxoxxgD2wyVaYUEs2dIiQfVNHtUWZvguxzKkTAe4u2RkRralXQg7t26jVcmXbGiUSxXcfmTuPnT9AwC3zyuEGj4b8d9kAG4Pe3HgaGYX3B8_bVd3oZgiYiWw5TVTMviwRrhQgHDuaNarEH71PCpdiclxBQV8u8XNBA/s320/kchibo-1.jpg"/></a></div>
Here are old version an a new one. Almost impossible to guess which is which.
However, the old version has a variable capacitor tuning, the new one has a resitor tuning -- and here they are (top photo: top is old; bottom photo: top is new):
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheldNm4NKMAY4lJxI7OUU7PuZPk8Vv-AiSAOYVHFKmVxzST7pQ33JI8le97-GH2rMupVvxSfaKttqcltpOT8n02c-3qB9ED358-TXH9TysOspe5_4htcj2dhUmnChuYf-6HY62P5aKJl5VnP15sj6Xeefy9dSYCpVk0pMadLSgohvgQEOkab0hMyOn/s4000/IMG_20220812_155030330_MP.jpg" style="display: block; padding: 1em 0; text-align: center; clear: left; float: left;"><img alt="" border="0" height="320" data-original-height="4000" data-original-width="3000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheldNm4NKMAY4lJxI7OUU7PuZPk8Vv-AiSAOYVHFKmVxzST7pQ33JI8le97-GH2rMupVvxSfaKttqcltpOT8n02c-3qB9ED358-TXH9TysOspe5_4htcj2dhUmnChuYf-6HY62P5aKJl5VnP15sj6Xeefy9dSYCpVk0pMadLSgohvgQEOkab0hMyOn/s320/IMG_20220812_155030330_MP.jpg"/></a></div>
Even more, new version has POWER led, but the old version has TUNE led.
Be warned!
PS. Unclear why DSP radio is such a shit -- it even has a quartz there.dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-40134326748762363352022-07-22T22:54:00.000+03:002022-07-22T22:54:01.465+03:00Basic HTTP auth with lighttpd, mod_authn_dbi and stored PLAIN PASSWORDSFirst, if you can avoid storing PLAIN PASSWORDS - avoid them and do not read this at all!<br /><br />Next,
<pre>
auth.backend = "dbi"
auth.backend.dbi += (
"sql" => "select md5(concat(username,':MyRealm:',password)) where username = '?'" ,
"dbtype" => "mysql",
"dbname" => "mymydb",
"username" => "mymylogin",
"password" => "mymypassword"
)
auth.require = (
"/" =>
(
"method" => "basic",
"realm" => "MyRealm", # The same realm as in sql statement!
"require" => "valid-user"
)
)
</pre><br /><br />Generally speaking, I do not understand the authors of lighttpd (which is my web-server of choice for around 10 years) in this exact logic and their love of Digest auth (I prefer Basic+https).<br />This works at least for lighttpd 1.4.65<br />Crossposted to linkedindtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-8121535477662316262022-01-15T09:01:00.001+03:002022-01-15T09:01:14.532+03:00Ikea Tradfri hub loosing connectivityIkea Tradfri Zigbee controllers are known sometimes to get offline, a lot of people over inet complaining on that. In case it is rebooted, it is working.
The less known thing is the network disconnect also restores availability.
However, disabling/enabling port on switch does not work, because some of the devices just stops transmission over ethernet port.
The thing that helps is speed changing to 10mbps and back! I have my Ikea Tradfri hubs running for several months. The server pings them and if it loses connectivity, I just change the speed of the ethernet ports -- and viola! - my Tradfri hub is back online.
The other problem is when devices goes offline, I have no solution -- and I do not even know how to detect that via COAPS....dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-10520746222109248762021-10-25T11:10:00.006+03:002021-10-25T11:10:58.523+03:00Prosody on OpenBSD 7.0after upgrade OpenBSD to 7.0, I've got " Cannot load driver MySQL. Available drivers are: SQLite3"
pkg_add lua52dbi-mysql
helped.
Yes, that's all I want to say about that!dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-10125864354379174802021-05-08T13:36:00.003+03:002021-06-17T17:26:06.935+03:00Compiling LIRC on Void LinuxAfter compiling I've noticed that 'default' driver is missing, this makes it unusable on Raspberry PI1.
The trick is
#include <sys/sysmacros.h>
in plugins/default.c somewhere around line 35.dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-1872299769572971992019-04-27T23:59:00.002+03:002019-04-28T00:00:08.611+03:00pmwiki and lighttpd<div dir="ltr" style="text-align: left;" trbidi="on">
Just my config, nothing more!
<pre>
$HTTP["host"] == "wiki.MYDOMAIN.TLD" {
$HTTP["remoteip"] !~ "^2001:START-OF-MY-IPV6-ADDR" {
url.access-deny = ( "" )
}
$HTTP["remoteip"] =~ "^2001:START-OF-MY-IPV6-ADDR" {
url.rewrite-once = (
"^/wiki/?([^?]*)$" => "/pmwiki.php?n=$1",
"^/wiki/?([^?]*)[?](.*)$" => "/pmwiki.php?n=$1&$2"
}
url.rewrite = (
"^/scripts/" => "404.html",
"^/wiki\.d/" => "404.html",
"^/local/" => "404.html",
"^/cookcook/" => "404.html"
)
fastcgi.server = ( ".php" =>
( "php-tcp3" =>
(
"host" => "127.0.0.1",
"port" => 9003,
# Do not check file exists on server side
"check-local" => "disable",
# Some php stuff
"broken-scriptfilename" => "enable",
# Docroot comes from sql in my case "docroot" => "/var/www"
,"fix-root-scriptname" => "enable"
)
),
)
}
</pre>
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-30196698161736287062019-01-22T12:25:00.001+03:002019-02-14T14:23:50.911+03:00ZyWALL, D-Link DFL-860, NAT-T: tricks and throughput<div dir="ltr" style="text-align: left;" trbidi="on">
I have Dlink DFL-860 running as IPSEC server. I've tried to connect to it with Zywall W30 and Zywall 2 behind of NAT, calling DFL.<br/>
That's possible. The trick is to set "My Address" of ZyWalls to WAN address - which they get from the DHCP behind the Nat (and not the real IP).<br/>
So the right way is to configure WAN port statically or bind WAN interface to fixed IP via dhcpd.
<br/>And next, some throughput table with my settings (somehow same for all the tested devices):
<table>
<tr>
<td> Device </td>
<td> <i>IPSEC/IKE1 throughput, as wget shows,kilo/megaBYTEs</i></td>
</tr>
<tr>
<td>D-Link HV808</td>
<td>540 KB/s (0.5 megabits/sec)</td>
</tr>
<tr>
<td>ZyWALL 30W</td>
<td>1.28 MB/s</td>
</tr>
<tr>
<td>ZyWALL 2</td>
<td>2.15 MB/s</td>
</tr>
<tr>
<td>D-Link DFL-860E</td>
<td>6.36 MB/s (note: the wire itself if 70Mbs)</td>
</tr>
<tr>
<td colspan="2"> <i>pppd over ssh, without hardware router (one side - banana PI, other is i7?)</i></td>
</tr>
<tr>
<td>IPv4</td>
<td>1,05MB/s</td>
</tr>
<tr>
<td>IPv6</td>
<td>962KB/s</td>
</tr>
<tr>
<td>Direct wget over IPv4, for line testing</td>
<td>9,64MB/s (but ISP says I have 70Mbs)</td>
<td>Direct wget over IPv4 via DI-808HV, Wan is DHCP</td>
<td>~5.4MB/s</td>
</tr>
</table>
Those devices are really antique (except DFL-860), but that's what I have to share.<br/>
I was not able to test D-Link DFL-100 and ASUS SL1000 because they are unable to do XAuth as client.<br/>
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-73670297072272147902018-12-07T09:40:00.003+03:002020-04-17T12:20:32.678+03:00Compex SRX1224<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Some notes on Compex SRX1224 switch.
<br/>
You plug an null modem cable there, and it does not work? Right?
<br/>
That's easy. You need the straight, non-null-modem cable! And you need some DB9F-to-DB9F direct converter.
<br/>
As for switch itself, it is 100Mbs switch, managed from console only, without 802.1Q, just port switch.
<br/>
UPD: also, for the Nortel/Baystack 325 and 425, you need straight cable, too. But it's a very different device, full of vlans and other useful features.
</div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-80333751024834936932018-06-10T00:23:00.001+03:002018-06-10T00:34:05.591+03:00Some more investigations on Compaq Prosignia VS<div dir="ltr" style="text-align: left;" trbidi="on">
I was sure that the board has a memory hole. Nothing like that! It's highly configurable. In the Compaq Setup you can say you have Unix and even Linux installed.<br/>
However, BIOS still reports 16M. You have to tell Linux it has more (8 onboard + 4*8 in my case) - so tell Lilo<br>
append="sim710=addr:0x8000,irq:15 mem=exactmap mem=640k@0 mem=15M@1M mem=24M@16M mem=nopentium acpi=off noisapnp"
<br />
No matter, still - one of the first thing Linux says - "I've caught NMI!". And linux ignores it. But OpenBSD does not ;-(
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-41296228717822440442018-03-28T01:53:00.000+03:002018-03-28T01:53:50.874+03:00Video cards in HP 9000 computers<div dir="ltr" style="text-align: left;" trbidi="on">
From time to time I get some HP 9000 video cards and plug them into my hp/ux HPPA computers. <br/>
For a long time I could not understand why they are not working: I can see them both in boot and in HP/UX, but hell, they show nothing!<br/>
The answer is simple: use at least 1260x1024x75 monitor. Really, I wasted a lot of time trying to understand why I cant run it.<br/>
And more, A4552 66501 PCI-X card at least shows something in PCI C160 computer!
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-25105115881896577562017-12-19T18:22:00.002+03:002017-12-19T18:22:24.610+03:00RCA / CDP1802 project with the same ideas<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://xepb.org/dtz/1802avr.html">Here</a>. Well, one more project to boot a CPU from ATMega8. And today that's a 1802!
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com1tag:blogger.com,1999:blog-2270897151224137811.post-40136971028736133022017-11-15T00:02:00.000+03:002017-11-15T00:02:46.151+03:00Tiny AVR based project to reset Z80 (or any other CPU) by a serial line<div dir="ltr" style="text-align: left;" trbidi="on">
For the modern DIY computers that's normal to be connected by serial port. And in most of cases that's the only way how the communication is made.
<br/><br/>
But all that Z80 and MC68000 CPUs sometimes HANGS! (Well, do not blame them, blame yourself for a buggy code). But no matter - we have to reset them. And to do that remotely.
<br/><br/>
So this tiny tool does that: it uses 2 lines from your DIY computer - the reset line and TTL-level RX line of the console. To initiate /RESET, just send break.<br/><br/>
You need ATTINY2313, avr-gcc compiler, mm...avrdude and (probably) to edit 2 lines of code in main.c:<br/>
<code>
#define F_CPU 12000000L<br/>
#define BAUD 57600<br/>
</code>
<br/>
First is the freq of yours' quarts, the second is the baudrate of your console.<br/>
<br/>
And all that work for me.<br/>
<br/>
Get it all <a href="http://xepb.org/dtz/resetz80bybreak.html"> here </a>
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-4082548952004335962017-06-13T18:55:00.001+03:002017-06-13T18:55:36.171+03:00Restoring root password in LevelOne GSW-2472TGX switch<div dir="ltr" style="text-align: left;" trbidi="on">
..is not trivial. More, there is no known way.
<br/>
So this is the original and the only known method invented by me:
<br/>
Take off the case. (The CPU is VIA6526A; just FYI, that will not help us). Plug serial @ 9600 8n1, plug power. Wait for login prompt.
<br/>
Then, hot-plug-off the only chip you can plug off - that's 2408 serial eeprom. Yes, really, plug it off! The switch is useless if you cannot restore root password, so nothing bad can happen, except of electric shock!<br/>
Then, login as root/root. It will think a little, but allow you to log in.<br/>
Next, hot-plug 2408 chip again and change the password.<br/>
You are done. My congrats!<br/>
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com2tag:blogger.com,1999:blog-2270897151224137811.post-48328877161021163242017-03-17T16:59:00.001+03:002018-01-21T00:14:31.561+03:00Sun 150 and semi-dead nvram<div dir="ltr" style="text-align: left;" trbidi="on">
Well, it happened to me: while Sun blade said some reasonable Mac and SystemID, they did not match.<br/>
The following helped:<br/>
Take Ultra 10 (you own Ultra 10, don't you?), power it up, then hotswap nvram chip and use mkp with system id 0x83.<br/>
It will complain "nvram is wrong", but auto-boot. Then put the chip back to SB100.<br/>
The problem came when I plugged VGA display to SB, improperly grounded.
<br />
UPD: the nvram died permanently. So I had to break the chip and install CR2032 to feed it.
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-39829505652124665682016-08-20T16:43:00.002+03:002018-10-20T13:32:33.445+03:00Installing Slackware 14.2 on Toshiba ac 100 with mainline kernel<div dir="ltr" style="text-align: left;" trbidi="on">
The tasks:
<ul>
<li> - switch to GPT partitioning and partition the EMMC</li>
<li> - compile kernel, make it bootable</li>
<li> - take slackware root</li>
</ul>
Before starting, keep at mind that internal EMMC is reffered as /dev/mmcblk0p, but if you plug SD card before loading... well, too early, it will became /dev/mmcblk0p, not 1p, as you can expect. This makes AC100 to boot at least root fs from SD card.<br/>
First, follow ARCH linux <a href="https://gist.github.com/Nokius/81cd46405b537931a472e0a55abb7ccd">installation guide</a>. The easiest way to compile kernel is to do it on some other ARM computer - saying, on Orange PI (Banana or Raspberry, if you prefer). Stop following this guide until you have only /boot (and /lib with kernel modules, and /etc/ with fstab) on your's EMMC card.<br/>
Then take Slackware arm root from <a href="ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/"> here </a> and copy it to EMMC (without boot and preserving /etc/fstab and /lib/kernel modules). Check twice you have a correct fstab (first, root fs and after you boot it - tmpfs and udev) <br/>
Next, take a full slackware-arm to sd card, boot the system, plug sd card, mount it, check you have udev running and.. you know what to do with slackware.<br/>
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-12202919122901695072016-08-05T02:13:00.001+03:002016-08-05T02:17:08.580+03:00GammuTK - very basic TK gui for sending SMSes via GAMMU<div dir="ltr" style="text-align: left;" trbidi="on">
Well, that does exactly what it does, and nothing more: it provides simple TCL/TK gui for sending [long][i18n] SMSes. It takes CSV file with phones, lets you edit the SMS and sends to selected numbers.
Nothing more. Grab it <a href="http://xepb.org/dtz/files/gammutk2670.tar.gz">here</a>.
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-17929765484635654692016-06-19T22:11:00.001+03:002016-07-14T12:53:31.111+03:00GNU screen on Mac OS X 10.4 & HP/UX 11.11<div dir="ltr" style="text-align: left;" trbidi="on">
I love GNU Screen. But their maintainers are insane or lazy. Because they does not fix a bug which exists for a long long time. It affects at least Mac OS X 10.4 and HP/UX 11.11.
<br/>
It compiles quite good. On Mac OS X you have to patch utmp.c changing makeuser() this way:<br/>
<pre>
<code>
(void)time(&now);
// DtZ u->ut_tv.tv_sec = now;
u->ut_time = now;
</code>
</pre>
But when you start screen, it says "Abort trap". The problem in realpath() called in tty.c.:
<code>
real = realpath(tty, NULL);
</code>
On the systems mentioned, it does not work with NULL as the second argument, it wants char * resolved_path there. <br/>
So at least for Mac OS X this helps (and the code for HP/UX is very similar):<br/>
<pre>
<code>
int
CheckTtyname (tty)
char *tty;
{
struct stat st;
// char * real;
int rc;
char real[PATH_MAX]; // DtZ
if (!realpath(tty,real)) return -1;
// real = realpath(tty, NULL);
// if (!real)
// return -1;
</code>
</pre>
<br/>
UPD: In screen 4.4.0 looks like they fixed it! Great! So on HP/UX 11.11 the only thing to convince it to compile is to create empty file /usr/include/sys/select.h (because in the other case it says "Unable to use fifos and sockets" or like that)
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-52447587981138822712015-06-08T23:30:00.000+03:002015-06-08T23:30:12.577+03:0068kavr ver 2560/0.00.02 is out<div dir="ltr" style="text-align: left;" trbidi="on">
If anyone cares, I've updated my <a href="http://xepb.org/dtz/68kavr.html">68kavr</a> firmware and BIOS. Lots of changes, but I'm lazy to build a normal release (because of summer) so this release is incremental. And, it is numbered 0.00.02!
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com2tag:blogger.com,1999:blog-2270897151224137811.post-47398230637070013132014-12-21T21:40:00.003+03:002014-12-21T21:40:45.162+03:008Mhz "On Semiconductors" 68008 runs at 12.5Mhz<div dir="ltr" style="text-align: left;" trbidi="on">
From several sources I know that Motorola MC68k parts do not like to run on higher freqs then nominal.<br/>
At least that's not true for "On Semiconductors" parts.
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-15748117297664510562014-12-19T18:28:00.002+03:002016-07-14T13:07:20.089+03:00Mathew Brandt's c68 and CP/M 68<div dir="ltr" style="text-align: left;" trbidi="on">
While looking for C compiler for CP/M 68 looks I've found something that
looks quite fine.<br/>
As for version "5.1 (beta)/25 Apr 2002" <code>c68</code> taken from
<a href="http://homepage.ntlworld.com/itimpi/compsrc.htm">http://homepage.ntlworld.com/itimpi/compsrc.htm</a> has <br>
<code>-cpm68</code>
option and it somehow work. It even claims that it generates AS68compatible source.<br/>
There are a lot of versions of this compiler on the net, but this one is surely the best I've tried (but as I understand it's unable to compile itself, what a pity)
<br/>
The way it does not work is writing hex as <code>0xXX</code>, not as <code>$XX</code>,
so here is a fix:<br/>
<code>out68k_c.c</code>:<br/>
<code><pre>
PRIVATE void put_byte P1 (UVAL,val)
{
put_header (bytegen, alignment_of_type (tp_char));
<b>oprintf ("$%lx", (unsigned long) (val & OxffUL));</b>
/*DtZ<s> oprintf ("0x%lx", (unsigned long) (val & OxffUL)); </s>*/
outcol += 4; /* or should be changed to +3 ? */
}
PRIVATE void put_word P1 (UVAL, val)
{
put_header (wordgen, alignment_of_type (tp_short));
/*DtZ <s> oprintf ("0x%lx", (unsigned long) (val & OxffffUL)); </s>*/
<b>oprintf ("$%lx", (unsigned long) (val & OxffffUL));</b>
outcol += 6; /* or should be changed to +7? */
}
</pre></code>
Next, <code>AS68</code> does not need/want "\t.sect", it accepts .data and .text directly. <br/>
<code>out68k_c.c</code>:<br/> <code><pre>
static void seg P3 (enum e_sg, segtype, const char *, segname, SIZE, al)
{
nl();
if (curseg != segtype) {
/*DtZ <s> oprintf ("\t.sect\t%s%s", segname, newline);</s>*/
<b> oprintf ("\t%s * Segment %s", segname, newline);</b>
</pre></code>
<br />
And you should edit <code>config.h</code> the way it can generate for 68000 and to check
the compiler binary you get can do <code>-cpm68k</code> and <code>-int=16</code>.
<br/>
Next, remember that's just compiler, not even preprocessor: so on unix side I had to do <br/>
<code>
cc -E -I/home/dtz/8BIT/68K/CPM1.3/DISK4 main.c > p_main.c<br/>
./cc68 -int=16 -cpm68k -v p_main.c > main.s<br/>
</code>
Also, note that standard CP/M 68's headers lacks most of the C functions; so I had to copy them
from "C language programming manual" (do not forget to add link<a href="http://xepb.org/dtz/projects/68kavr/CPM68/cpm.h.gz"> link there</a>!)<br/>
On CP/M system, assemble the file with <code>AS68 -U file.o</code>, and then link it with <code>CLINK.SUB</code>
<br/>
UPD: More, the code it generates can be feed to jas assembler mentioned some time ago.<br/>
UPDD: Looks like optimization code is faulty.<br/>
UPDDD: 201607 Mirrored <a href="http://xepb.org/mirrors/homepage.ntlworld.com/itimpi/compsrc.htm"> Here </a><br/>
</div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com1tag:blogger.com,1999:blog-2270897151224137811.post-17677446364206976992014-12-08T01:09:00.001+03:002014-12-08T02:27:24.917+03:00Sozobon's JAS runs at CP/M 68K<div dir="ltr" style="text-align: left;" trbidi="on">
As I expected, <code>JAS</code> from Sozobon C compiler for Atari was easy to port back to CP/M 68 and it works natively. <br/>
To do it, do the following: compile Sozobon C on unix host (see <a href="http://virtuallyfun.superglobalmegacorp.com/?p=97">virtuallyfun.superglobalmegacorp.com/?p=97</a> (or <a href="http://xepb.org/mirrors/sozobon_notes.html">mirrored on my site</a>), then compile jas by <code>xhcc</code>, now using <code>makefile</code> , not <code>make.unx</code>.<br />
First, make a small patch in <code>main.c</code>:<br/>
<code><pre>
if ( freopb( ofile, "w", stdout ) == NULL )
error( 0, "can't open object file for writing" );
<s> if ( freopen( ofile, "bw", stdout ) == (FILE *) NULL )
error( 0, "can't open object file for writing" );
</s>
</pre></code><br/>
Then take CP/M-68 1.3 distribution files; here you'll find <code>DISK4</code> and header files on it. You have to convert them to lowercase and erase all symbols after (and including) ^Z.<br/>
Then edit <code>makefile</code> to became smth like that:<br/>
<code><pre>
CC = ./xhcc
CFLAGS = -c -v -O -I/home/dtz/8BIT/68K/CPM1.3/DISK4
</pre></code>
Run make, you'll get 10 *.s files; then assemble them by <code>jas</code>:
<code>
<pre>
#!/usr/local/bin/tclsh
foreach f [glob *.s] {
exec ./xjas -8 $f
}
</pre>
</code>
You'll get 10 <code>.o</code> files. Transfer them to CP/M 68K host and link by DRI's <code>LO68</code>:
<code>
c:lo68 -R -u_nofloat -o jas.68k c:s.o CBUF.O CPY.O GEN.O HDR.O LEX.O MAIN.O OPS.O OPT.O PARSE.O PASS.O SCAN.O SYM.O c:clib
</code>
And know what? It works! (do not forget to add <s>-8</s> switch when calling <code>jas</code>).
However, that's not very useful as assembler, but better to have an assembler with SOURCE as alternative to AS68.<br/>
Get it from <a href="gopher://xepb.org/5/XEPb/softlib/jascpm68.tar.gz">here</a> ;-) [ok from <a href="http://xepb.org/dtz/softlib/jascpm68.tar.gz">here</a>]
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com6tag:blogger.com,1999:blog-2270897151224137811.post-71906881891387447862014-12-07T03:12:00.000+03:002014-12-07T03:12:22.617+03:00Use of Sozobon C on CP/M 68<div dir="ltr" style="text-align: left;" trbidi="on">
I've tried to make some use of Sozobon C compiler to be somehow-used on[or together with] CP/M 68.<br/>
First, it can be compiled on modern Linux/MacOSX; that's good. And the thing that is useful is <code>xjas</code> assembler. At least with <code>-8</code> flag it generates <code>.o</code> files with can be linked natively on CP/M'68 <code>lo68</code>.<br/>
<br/>
And, what I say? I say: GOOOOOOOOOD!
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-38091140833392427412014-11-18T16:12:00.001+03:002014-11-18T16:19:59.181+03:00Hello world assember 68k / as68<div dir="ltr" style="text-align: left;" trbidi="on">
One more reminder to myself: the skeleton of assembler program
<code>
<pre>
text
globl _main
_main:
move.b #'*',d1
move.w #2,d0 * calling BDOS '2'
trap #2
move.b #'*',d1
move.w #2,d0 * calling BDOS '2'
trap #2
move.b #$0A,d1
move.w #2,d0 * calling BDOS '2'
trap #2
move.b #$0D,d1
move.w #2,d0 * calling BDOS '2'
trap #2
rts
</pre>
</code>
Assemble
<code>
<pre>
AS68 hello.s
</pre>
</code>
Link
<pre>
<code>
LO68 -R -O hello.68K hello.O
</code>
</pre>
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0tag:blogger.com,1999:blog-2270897151224137811.post-67580731671592472582014-10-21T17:28:00.002+04:002016-05-20T14:44:04.477+03:00Compaq Prosignia VS - pcnet32 solution<div dir="ltr" style="text-align: left;" trbidi="on">
Oh yes - that was easy: just add 0x8800 address to pcnet32.c in kernel. It works both with 2.2 kernels and 2.4.latest, at least.<br/>
So currenty my Compaq Prosignia VS runs Slackware 7 with 2.4.latest kernel with all devices (except it sees only 16M of 40M of RAM)<br/>
Generally it was a bad idea to start with Slackware 7; looks like I could start with Slackware 11, but! - it is unable to start the installation with initrd - looks like it cannot fit my [or original] kernel and initrd in memory (as I said, 16M of 40M). I've tried different memmap='s , but still it does not helps.
UPD: append="sim710=addr:0x8000,irq:14 mem=exactmap mem=640k@0 mem=15M@1M mem=20M@16M mem=nopentium acpi=off debug noisapnp" - with this setting in lilo.conf 2.4.37 sees all my 36M of memory!
UPD: looks like that's not pcnet32.c , but lance.c should be edited.
<br /></div>
dtzhttp://www.blogger.com/profile/00324213553396348193noreply@blogger.com0