6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 14, 2024 12:25 pm

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Mar 06, 2008 1:45 am 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
OK - I have, within the last week, finally got around to doing something that I've been meaning to do for a (long) while now [1], and that's to unearth some code I'd been working on for my Beeb.

The reason I'd shelved working on the code was that, even with the grand total of 44KB 8) of available RAM on a 6502 Second Processor, my BBC BASIC-wrapped code just plain ran out of memory, and I had no other way (at the time) of squeezing more source code in.

Anyhow, as cross-assemblers on modern machines have access to (effectively) unlimited RAM, this is no longer a problem - but who here is (or has) written ROM code for a BBC Micro using a cross assembler, which did you use, and why?

(I'm looking for a simple way of producing an 8KB or 16KB binary image, that can - initially - be loaded into an emulator for testing, before being burnt out to EPROM for more permanent use in a physical machine.)

(And, yes, I can - and will - submit the source code and ROM image to the code repository, especially if people ask me to :D )

--Martin

[1] From the copyright message in the code, 6 years :oops:

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 06, 2008 7:41 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
mdpenny wrote:
Anyhow, as cross-assemblers on modern machines have access to (effectively) unlimited RAM, this is no longer a problem - but who here is (or has) written ROM code for a BBC Micro using a cross assembler, which did you use, and why?


I do not have a Beeb, and won't likely in the future. But I have been hacking on a 65816-based home computer design I call "Kestrel" for some time.

I use the ca65 assembler (part of the cc65 package), because it gives me precise control over how various sections of code and/or data map to which memory locations. Additionally, it supports the 65816 perfectly (NOTE: the C compiler, however, is strictly 6502 only!).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 06, 2008 8:59 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
Most of the BBC emulators I've used like a simple binary file containing the 16K of ROM image from $8000 upwards.

In the past I used Frank Kingswood's AS65 from here ...
http://www.kingswood-consulting.co.uk/assemblers/
... to build ROM images but when Windows XP service pack 2 removed support for 16-bit DOS applications I decided to right my own portable Java based relocatable macros assembler.
http://www.obelisk.demon.co.uk/files/6502.zip
The linker can be configured to produce a binary image after linking (Lk65 -code $8000-$BFFF -bin -output image.rom *.obj)

Nice to know someone else still dabbles in BBC code.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Mar 08, 2008 4:21 pm 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
I now have a (workable) solution, and can generate the required images.

Although I still have a bit of work to do on the code - I hadn't finished all the extra "*"-commands (the Acorn command-prompt utilities) when I had shelved the code, due to lack of space - if anyone would like me to -email them a copy of the current "test" image, just email me via the forum.

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Mar 08, 2008 6:23 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
What does the ROM do?

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Mar 08, 2008 9:11 pm 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
BitWise wrote:
What does the ROM do?


The ROM adds (among other commands):-

- Character-set related commands:
*CDISPLAY, *CRESET, *CDEFINE, *CREVERSE, *CINVERT, *CNEGATE
- Sideways ROM-related commands:
*SWROMS, *SWINFO, *SWDUMP, *SWCLEAR, *SWSEND
- Acorn Electron soft-key expansions (untested so far)

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jul 26, 2008 1:34 pm 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
OK, here's a bit of an update - I've got to a convienient point in adding extra code & stuff, and I'm doing a bit of "tidying up" before I go for a release.

The source code (still largely uncommented :roll: ) currently weighs in at a bit over 64KB, and produces object code that (just) fits into an 8KB ROM image - I have approx. 256 bytes spare before having to forcibly trim hooks I've left in place "for future expansion" (a beloved phrase from Acorn-produced documents :D ).

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 10, 2008 8:07 pm 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
Right - I've finished the coding I wanted to! I'm just writing a simple "Read Me" file, and it'll be ready for release - this version, as a zip file, by e-mail.

As I haven't been able to test the code (at all, let alone properly) on an Electron, I'd particulary appreciate someone who *can* test the ROM image on an Electron getting in touch with me, to help with testing.

Anyone wanting a copy, let me know.

TIA,

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 07, 2009 10:37 pm 
Offline

Joined: Mon Sep 07, 2009 10:28 pm
Posts: 1
Hi, it won't produce a binary blob, but the most popular assembler at least over at Retrosoft, is BeebASM owing to the way it assembles from source directly to a bootable disk image. As you don't want that, I'm not sure there's any real reason to recommend it over any of the generic tools.

Also, I'm the author of ElectrEm, an Electron emulator. The emulator hasn't supported user ROMs for years, but only due to user interface concerns. I'd be more than happy to test your ROM against the emulator if it would help. The version of the emulator I have accurately emulates 100% of known software (well, known and available from the 'net), including all memory/timing issues, so it's not as much worse than testing on a real machine as you might assume.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 30, 2009 11:36 pm 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
I've been doing some further work on my code; I've added a couple of commands, rewritten some bits (including "fixing" a long-standing potential problem, and finding a long-forgotten incomplete routine), and carried out a general tidy-up.

So, all-in-all, I'm nearly ready to push out a point-release; as before, if anyone wants a copy, get in touch, and I'll e-mail it out, once I've got it ready.

(Alternatively, if anyone wants me to submit the code the 6502.org code repository, let me know.)

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 31, 2009 12:04 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
Quote:
(Alternatively, if anyone wants me to submit the code the 6502.org code repository, let me know.)

I've never seen a BBC Micro in person or been involved, but I would say that when/if you feel like the info is presentable and you're more-or-less done, it probably should go up on the website. As long as we're not just cluttering it with junk and untrue things and making the real gold harder to find, we should present all the materials we can and make 6502.org the greatest possible resource for the 6502 family of processors and peripherals with whatever amount of time we're able to give it. (I'm quite familiar with the time limitations, since I myself have started plenty of things for the website that never made it to completion.)


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 31, 2009 5:50 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
mdpenny wrote:
(I'm looking for a simple way of producing an 8KB or 16KB binary image, that can - initially - be loaded into an emulator for testing, before being burnt out to EPROM for more permanent use in a physical machine.)

I know you have a solution now, but here's how I'm doing it, using ca65:
Code:
ca65 -l boot816.as -D BASE=0x8000
cl65 boot816.o --target none --start-addr 0x8000 -o boot816.bin


Also
mdpenny wrote:
... if anyone wants a copy, get in touch, and I'll e-mail it out, once I've got it ready.

Yes please!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jan 04, 2010 9:03 am 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
A quick update - I've managed to find an Electron emulator that allows me to load my ROM code as if it were a cartridge; this has allowed me to do some Electron-specific testing.

I've found some bugs (not just in Electron-specific code), and fixed most of them. However, the "firm key expansion" code is - sadly - rather badly broken; I'm having a look to see if I can easily fix it - if not, I'll disable it for this release (0.91), and work on fixing it properly for the next release (0.92).

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 09, 2010 12:15 pm 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
I now have some working code, and have wrapped version 0.91; anyone who wants me to e-mail them a copy, please send me a private message - the .zip file is a mere 20KB, so shouldn't break anyone's Inbox.

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 24, 2011 12:33 am 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
I've updated the "MUTILS" Sideways ROM to v0.92, and have made it available in this Retro Software thread:

http://www.retrosoftware.co.uk/forum/viewtopic.php?f=73&t=710

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: