6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 9:54 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Tue Oct 01, 2024 1:10 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 49
I'm looking for programs to test my 65816 emulator.
I wrote a 65816 simulator on ARM Cortex.
I'm currently running it on STM32H750. It passed the entire test
65816 Test Suite. However, I would like to do more tests, especially to check its speed, to compare it with a real 65816.
What programs would you recommend?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 01, 2024 1:19 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
which test suite do you mean? I find
https://github.com/gilyon/snes-tests/tree/main/cputest
(which it seems Daryl has picked up for the Kowalski simulator)


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 01, 2024 3:03 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 49
Yes I used this with additional tests for BCD.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 01, 2024 3:07 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
that's good then!

You might like to run BBC Basic as ported by dominicbeesley to the 816. It can be found in
https://github.com/dominicbeesley/CommunicatorBasic100


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 01, 2024 4:24 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 49
That would be an interesting challenge.
But I think I still need to add some features.
For now my system only simulates 65816 and has 512 KB of RAM.
I currently communicate using the SERIAL port and I don't have any operating system that provides I/O support.
I can load a Bin image file and run it.
It's basically the equivalent of The Kowalski SImulator


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 01, 2024 5:11 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Serial should be fine for BBC Basic. It will use system calls for in and out, and you'd be providing a small OS shim which can talk to the serial port.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 02, 2024 11:34 am 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 49
UPss. I think I'm having trouble setting up the build. It seems that it will take me some time to solve it ;) Any suggestions for a first step ?
My system is 512 kRAM, no ROM and I/O add adres $007f00 accepts only LDA $7f00 / STA $7f00 and LDA $007F00 STA $007f00

I understand that BASIC communicates with the operating system through the COP number.
Is it true ?


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 04, 2024 1:07 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 49
I managed to compile the communicator BASIC
I would like to recreate the OS, to do this I would need some description of its functions, first of all these:
Code:
COP_00_OPWRC
COP_02_OPWRA                    ;print string at BHA
COP_03_OPNLI                    ;OS NEWL
COP_04_OPRDC                    ;OSRDCH
COP_06_OPOSB
COP_07_OPOSW
COP_0A_OPBGT
COP_0B_OPBPT
COP_0E_OPCOM
COP_0F_OPERR
COP_10_OPADP
COP_11_OPADF
COP_16_OPAEV
COP_18_OPRLH
COP_1A_OPFZB
COP_21_OPPRE                    ;YIELD
COP_24_OPCVD
COP_26_OPBHA                    ;get address of "ARITHMETIC"
COP_28_OPCMD
COP_29_OPRFR                    ;Get reference to Arithmetic module
COP_22_OPRLN                    ;; read line cf OSWORD 0
COP_2C_OPFMA
COP_2E_OPFPO
COP_44_OPOPN
COP_45_OPCLS
COP_46_OPEND                    ;OPEND
COP_4E_OPLOD
COP_4F_OPSAV
COP_54_OPRSP
COP_55_OPWSP
COP_57_OPRLL
COP_58_OPWLL
COP_5D_OPSTAR
COP_61_OPERC                    ;get error string to BHA

I found a website on the internet archive with files that I think are useful, unfortunately the files have disappeared. Does anyone have archived files from this website?
https://web.archive.org/web/20190607065 ... ommuni100/


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 04, 2024 1:29 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Probably just a re-org - try
https://mdfs.net/System/ROMs/AcornMOS/Communicat/


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 04, 2024 2:02 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 49
Thank you for the link. And do you know more places where I could find information about this computer.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 04, 2024 2:18 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
You might find more on the stardot forums. But meanwhile, perhaps
https://chrisacorns.computinghistory.or ... cator.html
https://stardot.org.uk/forums/viewtopic.php?t=15639

There are not many of them around. I believe MAME will now allow you to experiment with it, although it's not fully working, so you might need to persuade it. It looks like the ROMs on mdfs.net correspond to the Briefcase model, for checksum matching purposes.

Perhaps see also my post over here
https://retrocomputingforum.com/t/acorn ... asking/939


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 04, 2024 4:20 pm 
Offline

Joined: Wed Oct 16, 2013 9:34 am
Posts: 9
Sorry I meant to answer this topic when Ed prompted me but it slipped my mind.

You shouldn't need all of those COP calls to be implemented - I think the BBC Micro build and shim only do a handful

There's documentation of most of the Communictor OS here https://github.com/dominicbeesley/Commu ... e/main/doc and that git contains my disassembly of the Communicator's OS which has a many of the calls documented too. There's a html version here https://raw.githack.com/dominicbeesley/ ... LLK-COP_00 other modules of the OS are available in the git repository.

It has been a while since I looked at this but I think possibly the way to proceed would be to go with bas816new.asm file and go through and copy the IFDEF MOS sections and make new IFDEF GREGORIO sections

Then you'll need to set up the BASIC environment by making a customised init sequence (around line 767) where you setup a private direct page for BASIC and set up the memory location and size that BASIC uses to store its program.

A minimal first boot of BASIC will probably need simple implementations of OSRDCH, OSWORD (0) - read a line, OSWRCH/OSASCI to write a character. You could start by implementing the communicator COP calls but they are complicated with a load of stuff for setting up multi-tasking.

D


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 05, 2024 3:06 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 49
I have a problem assigning ROMs to specific memory BANKS.
https://mdfs.net/System/ROMs/AcornMOS/Communicat/
I found that the COP instructions point to $FFB655, but I can't match any file to that area.
There are also no disassemblies of ROMv100-2.zip ROMv100-2
Interestingly, the MemoryMap file mentions ROM BANKS 0-4


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 05, 2024 3:17 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
I've a vague recollection that after a COP, or in interrupt context, there's some different temporary mapping of ROMs. I could be wrong about that. Maybe there's some incomplete decoding?


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 07, 2024 11:56 am 
Offline

Joined: Wed Oct 16, 2013 9:34 am
Posts: 9
I think there's some monkeying with the mappings at boot time (to map the ROM containing MOS into bank 0 to catch the reset vector) but after that it all remains where you'd expect. It all happens at $B04F in the MOS module which is in the rom labelled "0" in the mdfs.net files - I can't recall how each ROM is mapped in to each bank of address space but I seem to recall there being some confusion.

D


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

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: