Search found 87 matches

by hjalfi
Tue Apr 10, 2018 7:09 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

0.6, and then 0.6.1 after I realised that 6502 codegen had been broken since 0.5 but nobody had noticed. I think I'm actually going to take a break from this now. The next big thing to do is to rewrite the parser, which is horrible; but I want to spend some time porting Fuzix to my new laptop first ...
by hjalfi
Wed Apr 04, 2018 10:59 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

Just released Cowgol 0.5. http://cowlark.com/2018-04-05-cowgol-0.5/ This version has some 6502 fixes, but the big new feature is a Z80 code generator and CP/M support. I've been testing with a Unix CP/M emulator, but I don't see any reason why it wouldn't work on a BBC Z80 second processor running C...
by hjalfi
Tue Mar 13, 2018 10:43 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

Prior to about five minutes ago I was thinking that a peephole optimiser would be rather hard based on a mistake in the internal architecture, but I actually think now it would be perfectly possible. There's a lot of things which can be easily improved by a peephole optimiser which would be hard to ...
by hjalfi
Mon Mar 12, 2018 10:58 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

0.4! The 6502 code generator is looking pretty darn adequate, if I say so myself. It's still dumb as rocks, but the set of heuristics it's using is producing code which isn't too awful. Here's the print routine, which is really naive: sub print(ptr: [int8]) loop var c: int8 := ptr[0]; if c == 0 then...
by hjalfi
Tue Feb 27, 2018 10:20 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

I was reading and writing blocks of five to ten bytes, depending on exactly what was happening. The tokeniser, of course, was reading text a byte at a time. My new buffered version reads and writes blocks of 256 bytes (aligned with sector boundaries; I'm hoping that ADFS is smart enough to optimise ...
by hjalfi
Mon Feb 26, 2018 10:13 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

0.3!

Now the standard benchmark takes 7m50s, which means it's now twice as fast.

Reading and writing small objects via MOS system calls turns out to be really, really slow, especially over the second processor.
by hjalfi
Thu Feb 22, 2018 10:37 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

Cowgol's not dead! I've just released version 0.2. http://cowlark.com/cowgol/ Lots of bug fixes --- I can't believe the previous version actually worked --- and a few new language features (array initialisers). And now there's basic Commodore 64 support. It also supports standard library precompilat...
by hjalfi
Thu Feb 22, 2018 10:33 pm
Forum: programming
Topic: Correctly handling EOF when reading with OSGBPB
Replies: 3
Views: 243

Re: Correctly handling EOF when reading with OSGBPB

The issue is that I don't want to have to remember whether I've hit EOF or not while I process the data --- the API I have to implement it doesn't allow it, so I'd need to find a way to associate another kind of EOF flag with a channel, and that way lies madness. The tricky bit is that it's possible...
by hjalfi
Wed Feb 21, 2018 10:15 pm
Forum: programming
Topic: Correctly handling EOF when reading with OSGBPB
Replies: 3
Views: 243

Correctly handling EOF when reading with OSGBPB

I'm trying to implement an API which wants to read blocks off a disk. (Cowgol's file_getblock(), actually.) The API definition is: if there's any data, you get something; if you're at the end of the file and there's nothing to read, you get an EOF response. The MOS's EOF handling appears to be a bit...
by hjalfi
Tue Feb 06, 2018 5:36 pm
Forum: hardware
Topic: Thought experiment: Iomega zip drive for the BBC
Replies: 10
Views: 457

Re: Thought experiment: Iomega zip drive for the BBC

No longer travelling! But now everything is fuzzy from jetlag. Re pins: I haven't found anything written down and am mainly going from the Linux zipdrive driver, but it looks like when in byte mode you acknowledge a read by twiddling the line feed line. So with that, strobe and reset that gives 11 p...
by hjalfi
Tue Feb 06, 2018 11:15 am
Forum: hardware
Topic: Thought experiment: Iomega zip drive for the BBC
Replies: 10
Views: 457

Re: Thought experiment: Iomega zip drive for the BBC

Things have improved; I'm now bored in an airport in Paris. But it occurs to me that given the protocol is intrinsically parallel, it may be possible to get much better performance than bitbanging SPI over the user port. How many user port pins are there? I think in parallel mode it would only need ...
by hjalfi
Mon Feb 05, 2018 10:51 pm
Forum: hardware
Topic: Thought experiment: Iomega zip drive for the BBC
Replies: 10
Views: 457

Re: Thought experiment: Iomega zip drive for the BBC

Curses, you're right --- there's a single acknowledge line rather than the four different status lines of the PC port. So it would have to be the user port, instead. Given that it would need a custom connector it hardly seems worth it.

But, real floppy disk noises...
by hjalfi
Mon Feb 05, 2018 9:45 pm
Forum: hardware
Topic: Thought experiment: Iomega zip drive for the BBC
Replies: 10
Views: 457

Thought experiment: Iomega zip drive for the BBC

Righting now I'm waiting for my flight in SFO airport and it's really dull, so... While here I managed to score a lovely old IBM PC Convertible (1986-era 8088 laptop). Bear with me, there's a point. The thing has twin 720kB floppy drives and no hard disk. So, I also picked up for almost no money som...
by hjalfi
Fri Nov 17, 2017 3:57 pm
Forum: emulators
Topic: Recommended emulator for Linux?
Replies: 8
Views: 866

Re: Recommended emulator for Linux?

(belatedly) Yes, thank you for looking at the issues! I hope my bug reports have been useful. I really like b-em --- the debugger (particularly the tube debugger) has been invaluable getting Cowgol up and running. The speedup options help too. I haven't used the hard drive emulation stuff yet, becau...
by hjalfi
Thu Nov 09, 2017 11:10 am
Forum: software: other
Topic: API for renaming files?
Replies: 6
Views: 470

Re: API for renaming files?

The Advanced User's Guide doesn't mention anything above OSFSC 8. This is in the context of b-em's copy of VDFS, which doesn't implement features like deleteing or renaming files (most of them just silently do nothing, causing my build scripts to fail in hilarious fashions). It seems like a very odd...
by hjalfi
Sun Nov 05, 2017 7:25 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

Belated, due to other projects and Windows barfing on my Linux partition... thankfully all my actual *data* was elsewhere, but it did take a while to figure out how to build MAME again. I hacked in support for precompiling the standard library, allowing you to skip about 8 minutes of boilerplate for...
by hjalfi
Sun Nov 05, 2017 3:25 pm
Forum: software: other
Topic: API for renaming files?
Replies: 6
Views: 470

API for renaming files?

Silly question, but...

I can't find any API way of renaming files on the MOS. I'd expect it to be in OSFILE somewhere next to 0x06 (delete file), 0x08 (create directory) etc. But there's nothing.

Does one exist, or is it only implemented via *RENAME?
by hjalfi
Sun Oct 15, 2017 5:57 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

Not really --- the internal representation doesn't use symbols, so there's no way for two object files to tell each other when they're referring to the same object. Also, the classifier phase needs access to the entire program in order to build the graph to do variable placement (which is the magic ...
by hjalfi
Sun Oct 15, 2017 1:13 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

I got it running in MAME, with hopefully more accurate timing and floppy disk noises: https://www.youtube.com/watch?v=1wLATW7sVXs The bad news is that the 'Hello, world!' compilation now takes 1010 seconds, or nearly seventeen minutes. It sounds like nearly all the time is spent waiting for disk see...
by hjalfi
Sun Oct 15, 2017 11:54 am
Forum: emulators
Topic: MAME: Tube devices
Replies: 68
Views: 4247

Re: MAME: Tube devices

It works! No nice floppy disk noises, though --- MESS claims the floppy sound drivers are enabled. (I was rather wanting to hear the disks so I could get a handle on how much time was being wasted on seeks.) Is there a flag to enable it somewhere? Also, even with the 1770 controller, bbcb won't moun...
by hjalfi
Sun Oct 15, 2017 10:18 am
Forum: emulators
Topic: MAME: Tube devices
Replies: 68
Views: 4247

Re: MAME: Tube devices

Well, I got MAME built, and huge it is too; but it's looking for two specific 4kB ROM files: 6502tube.rom and 65C102_BOOT_110.rom. The only Tube ROMs I can find are 2kB, and don't work. (e.g. here: http://mdfs.net/Software/Tube/6502/)

Any suggestions on where to find these?
by hjalfi
Fri Oct 13, 2017 1:40 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

I don't actually have any real hardware, so all this is running on an emulator. I mostly use b-em. I've noticed that b-em's floppy disk noises aren't accurate, and it just classifies seeks into single step / short / medium / long, with timings to match, so I believe it's unfairly slow. Without the f...
by hjalfi
Fri Oct 13, 2017 1:35 pm
Forum: emulators
Topic: MAME: Tube devices
Replies: 68
Views: 4247

Re: MAME: Tube devices

I'm looking for a version of MAME which supports the 6502 coprocessor --- it looks from this thread like it's working now? Any suggestions on where to find it (and use it)? The current binaries I have access to don't seem to have it (it behaves as if no coprocessor is plugged in). Do I need to build...
by hjalfi
Thu Oct 12, 2017 10:42 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

by hjalfi
Wed Oct 11, 2017 11:19 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Re: Cowgol: actually a thing

...and I just found the first bug! Looks like there's something wrong with the things table --- there are duplicate entries when the offset is bigger than 0x8000. Sigh.

Incidentally, if you ever want to know what a BBC Micro sounds like when it's swapping, Cowgol is for you.
by hjalfi
Wed Oct 11, 2017 11:07 pm
Forum: projects
Topic: Cowgol: actually a thing
Replies: 26
Views: 1878

Cowgol: actually a thing

(This is a new topic because the previous one was misleadingly titled and had degenerated into me complaining about how terrible the 6502 was. Plus, this is a major milestone. Is that okay?) I am very pleased, gleeful even, to announce the first proper release of Cowgol, my almost self hosted fully ...
by hjalfi
Sun Oct 08, 2017 9:20 am
Forum: software: classic games
Topic: "Adventure Island" Does anyone know it??
Replies: 37
Views: 4582

Re: "Adventure Island" Does anyone know it??

I don't remember there being any PvP elements in the game, so any competition with the other teams would solely have been about who could escape (or die) first. It was very much PvE. The actual game was pretty simple: there were some basic simulation mechanics for travelling and survival plus a bunc...
by hjalfi
Sat Oct 07, 2017 4:11 pm
Forum: software: classic games
Topic: "Adventure Island" Does anyone know it??
Replies: 37
Views: 4582

Re: "Adventure Island" Does anyone know it??

Belatedly: My school actually had Adventure Island, although they never actually taught with it; as the pudgy nerdy kid with run of the computer room I was probably the only one who played it. It was great, although quite peculiar if you only knew conventional games. It was very much based around cl...
by hjalfi
Sat Oct 07, 2017 10:17 am
Forum: emulators
Topic: Recommended emulator for Linux?
Replies: 8
Views: 866

Re: Recommended emulator for Linux?

No problem --- bugs added (I also found another less obvious VDFS crash).

I like b-em; it's good to know it's still being worked on.
by hjalfi
Fri Oct 06, 2017 10:43 pm
Forum: emulators
Topic: Recommended emulator for Linux?
Replies: 8
Views: 866

Recommended emulator for Linux?

I'm looking for a decent Linux BBC emulator with Tube and VDFS support. Right now I'm using the version of b-em from https://github.com/stardot/b-em, but it hasn't been updated for months, and people aren't talking about it much --- it looks like a lot of the effort has switched to beebem, which is ...