SAM-Coupe new core

Field Programmable Gate Array based devices! As exciting as they sound
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

SAM-Coupe new core

Post by zxmicrojack »

Hi all,

Just wanted to announce the new SAM-Coupe core:MGT SAM Coupe

https://github.com/ZXMicroJack/sam-coup ... ses/tag/r1

Comments welcome.

Cheers
MJ

=============

Based on McLeod's SAM coupe core. Added single disk drive reading from SDcard in either
FAT16 or FAT32 format in DSK format. Also a PS2 mouse should be working - it works fine
on another board, but I don't have a splitter to test the ZXUNO yet.

Keys
----
- F12 - disk menu
- F5 - NMI button
- CTRL-ALT-DEL - reset SAM
- CTRL-ALT-Backspace - reset to BIOS.
- SCROLL-LOCK - switch from VGA to RGB and back.
- (numeric keypad [-]) - switch on/off scanlines

Known issues
------------
- Only 1 disk at the moment
- Only support for .DSK format

Links to sites with disk images
-------------------------------
- https://velesoft.speccy.cz/download.htm
- http://ftp.nvg.ntnu.no/pub/sam-coupe/

Feedback
--------
[email protected]
User avatar
Pegaz
Dynamite Dan
Posts: 1210
Joined: Mon Nov 13, 2017 1:44 pm

Re: SAM-Coupe new core

Post by Pegaz »

@zxmicrojack

I would like to publicly thank you for all your great work and contribution to the zx-uno community.
You raised the bar a lot and showed that zx-uno has the true spirit of the Sinclaiar computers - great potential coming from modest hardware.
It is my great pleasure that you have given me the opportunity to help you in this journey. :)
Cheers.
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

It has been my pleasure, and a great collaboration. Without your methodical QA, and attention to detail, I'd be still working on it! Thanks for your help in ensuring it meets the ZXUNO high standards, and all the background work you do - it's not unnoticed.
;)
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

No FULL sources?
6 years of waiting was in vain ...
crying :( :( :( :( :(
Well, okay.
Then I'll tell you what I see
tv80n is a very poor choice for a processor core.
sound module SAA1099 - also needs to be changed
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

There are full sources.
https://github.com/ZXMicroJack/sam-coupe
https://github.com/ZXMicroJack/ctrl-module

Please let me know what you think is missing.... I had only added disk access, but I'm happy to add more.

What z80 core do you recommend?
What SAA1099 core do you remmend?

Thanks for your comments, I'll add them to the list. :D
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

So much better.
But collecting is still impossible.
I'm a stupid Windows user, and it's not possible for me to compile CtrlROM_ROM.vhd and CharROM_ROM.vhd files from Linux sources :(
I call such sources complete, so that by downloading only the project directory from github - and running the sam_v4.xise file in ISE - everything is assembled without unnecessary gestures, without the need to install Linux and understand ZPUflex
z80 core - T80 is always recommended, preferably in Sorgelig's edition (T80s, T80pa etc.)
the SAA1099 module is also highly recommended by Sorgelig, but there is only one problem with it, it has been redesigned for SystemVerilog, which is very bad for ISE :) But this is a lesser problem. In the presence of collected sources, I would solve it
User avatar
desUBIKado
Microbot
Posts: 108
Joined: Sun Jan 10, 2021 10:27 am

Re: SAM-Coupe new core

Post by desUBIKado »

azesmbog wrote: Tue Apr 05, 2022 12:37 pm No FULL sources?
6 years of waiting was in vain ...
crying :( :( :( :( :(
Well, okay.
Then I'll tell you what I see
tv80n is a very poor choice for a processor core.
sound module SAA1099 - also needs to be changed
No Telegram, no fun !!! :D

Image
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

Commiting generated materials is unconventional, but just for you I'll do it. Thanks for the information on the modules, I have a SV to verilog converter so will try that one.
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

Well, perhaps Linux users are not accepted ("Here's a car for you! It's okay, it's a bunch of spare parts. Assemble it yourself. Here's the instruction. And say thank you that these are spare parts, not iron ore!"), But I'm used to the fact that if they post the source codes , it is usually accepted that they gather without the participation of a tambourine and dances around them.
Here is an example of correct sources:
https://github.com/zxdos/sources
And there are several cores with ZPUflex
here are the sources from Sorgelig (T80 core)
https://github.com/MiSTer-devel/SAM-Coupe_MiSTer
here is SAA1099
https://github.com/MiSTer-devel/SAM-Cou ... saa1099.sv
User avatar
desUBIKado
Microbot
Posts: 108
Joined: Sun Jan 10, 2021 10:27 am

Re: SAM-Coupe new core

Post by desUBIKado »

SAA1099 implementation on Spectrum ZX-Uno core: https://github.com/spark2k06/zxuno/blob ... saa1099s.v

ZPUflex expert in ZX-Uno Telegram group is Antonio Silva. It is used, for example, with his ZX81 core. ( https://github.com/avlixa/ZX81_MiSTer_z ... le/ZPUFlex )
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

desUBIKado wrote: Tue Apr 05, 2022 6:52 pm SAA1099 implementation on Spectrum ZX-Uno core: https://github.com/spark2k06/zxuno/blob ... saa1099s.v
Well, it's not even funny.
This is my modification.
I'm not sure that I did everything right there.
I want to see the work of a pro
Spoiler
(маленькая буковка "s" - это как раз что с SystemVerilog-a переделано) Мне чужие копирайты не надо)
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

azesmbog wrote: Tue Apr 05, 2022 6:18 pm Well, perhaps Linux users are not accepted ("Here's a car for you! It's okay, it's a bunch of spare parts. Assemble it yourself. Here's the instruction. And say thank you that these are spare parts, not iron ore!"), But I'm used to the fact that if they post the source codes , it is usually accepted that they gather without the participation of a tambourine and dances around them.
Here is an example of correct sources:
https://github.com/zxdos/sources
And there are several cores with ZPUflex
here are the sources from Sorgelig (T80 core)
https://github.com/MiSTer-devel/SAM-Coupe_MiSTer
here is SAA1099
https://github.com/MiSTer-devel/SAM-Cou ... saa1099.sv
What's wrong with tambourines? I think google translator did a bit of a hyperbolic transformation on your words there. What I understand is, "Hi, thankyou for your efforts, could you please check in the generated sources for me? Cheers."

My response is: "Hi - yes, no problem. It might help to decouple the dependency between the two repos to do this. I'll do it in future, thankyou for your feedback."

Thankyou for the sources, I will add it to the list. Along with the tambourines. :D
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

So I tried all the suggested SAA1099 implementations and it still sounds nasty, so I guess whatever is causing the distortion is not the SAA1099 module. With that, Ill move onto the other issues for now, and investigate separately - thanks for your help anyway.
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

New SAM coupe R2

https://github.com/ZXMicroJack/sam-coup ... -zxuno.zip
Fixed items:
- added 9 sector / CPM disk support
- moved Ctrl-Alt-Del
- fixed brightness problem found on prince of persia
- fixed joystick issue
- can now boot ProDOS (CP/M)
Not fixed:
- SAA issue is still present - no matter what version is used
- Z80 is still original core as yet
- Copy-protected disks are not supported - such examples are Lemmings, days of sorcery, Exodus

@azesmbog I enclosed CtrlROM_ROM.vhd for both char roms and ctrl-module for your happy building, with no dancing with tambourines needed.
Spoiler
Только для тебя, мой друг.
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

zxmicrojack wrote: Sun Apr 10, 2022 10:40 pm @azesmbog I enclosed CtrlROM_ROM.vhd for both char roms and ctrl-module for your happy building, with no dancing with tambourines needed.
Thanks of course bro :)

The project is already being assembled, even launched. But..
I'll start from afar..
I also have ZXUNo, I tried both of your already compiled files, both the previous one and the last one.
Yes, there is a menu with disks, I can choose images. Run - I can not. What am I doing wrong again??
After downloading the image, I exit the menu and press NMI (F5) ? Or is it necessary to manually run the contents on the disk with a command ???

well, regarding the file that I compile from source for my devboard. It builds correctly and loads. But the discs just do not start. But at least something)

Tried a dozen different .DSK discs, both MGT and eDSK.
None work after pressing NMI
(in the emulator - they work)
User avatar
Pegaz
Dynamite Dan
Posts: 1210
Joined: Mon Nov 13, 2017 1:44 pm

Re: SAM-Coupe new core

Post by Pegaz »

@azesmbog

After inserting the disk image, you need to press 9 on the numeric keypad (F9 on real SAM) to boot.

Or you can go to Basic and type BOOT, which is the same...
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

Pegaz wrote: Mon Apr 11, 2022 6:01 pm After inserting the disk image, you need to press 9 on the numeric keypad (F9 on real SAM) to boot.

Or you can go to Basic and type BOOT, which is the same...
So much better!! A couple of disks started up :) I would not have guessed about "9" on the numeric keypad :) but I definitely tried F9.
Thank you!
upd:
I defeated my disk with the help of a good utility from Sir David.
Now I'll take care of the core, something my keyboard does not work at all correctly.
Thanks again @zxmicrojack & @Pegaz
User avatar
Pegaz
Dynamite Dan
Posts: 1210
Joined: Mon Nov 13, 2017 1:44 pm

Re: SAM-Coupe new core

Post by Pegaz »

azesmbog wrote: Mon Apr 11, 2022 6:21 pm
Pegaz wrote: Mon Apr 11, 2022 6:01 pm After inserting the disk image, you need to press 9 on the numeric keypad (F9 on real SAM) to boot.

Or you can go to Basic and type BOOT, which is the same...
So much better!! A couple of disks started up :) I would not have guessed about "9" on the numeric keypad :) but I definitely tried F9.
Thank you!
upd:
I defeated my disk with the help of a good utility from Sir David.
Now I'll take care of the core, something my keyboard does not work at all correctly.
Thanks again @zxmicrojack & @Pegaz
You welcome.
Some disk images have auto boot, some do not.
For such disks its necessary to type dir and then load a single file with Load "filename".
Also, some disks don't even have DOS itself, so the DIR command can't be used.
In that case, you need to load DOS from another floppy with Boot 1, then replace the image and read the directory, with the DIR command...
Of course, most of commercial software has an auto boot.
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

Exactly 6 years ago, I made my first attempt to port something from the ZX Uno project to the AEON development board. And the first core that started up for me was just Sam Coupe :) With all subsequent cores it was already somewhat easier to figure it out) But this core only worked with a tape recorder, and for these reasons it was very limited.
So I've been patiently waiting for 6 years for core with disk support! (SamCoupe+disk was one of the first to appear on MiSTer, but there support for disks is somewhat different, unsportsmanlike :)
and I got the original ZX Uno many years later, only for experiments and checks :)
I ported the previous version of SamCoupe to ZXDOS + a year ago, now I will try this one. But so far there is an incomprehensible problem with the keyboard :), although the disks are already working.
Well, I learned how to add boot loaders to disks, as well as DOS itself. from other discs.
In what program can I check the joystick?
User avatar
desUBIKado
Microbot
Posts: 108
Joined: Sun Jan 10, 2021 10:27 am

Re: SAM-Coupe new core

Post by desUBIKado »

azesmbog wrote: Mon Apr 11, 2022 7:42 pm In what program can I check the joystick?
Manic Miner or Pang, for example.
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

desUBIKado wrote: Mon Apr 11, 2022 9:08 pm Manic Miner or Pang, for example.
Thanks, I'll check them out as well.
but I understand the joystick duplicates the buttons 6-0?
Then everything is bad, you probably have to cut it out. I think problems with the keyboard - because of him. Because at startup, 00000000 is endlessly printed on the screen .... Of course, you can stop. But with the joystick connected, it starts to print endlessly what you press - 6 or 7 or 8 or 9, etc. and it can't be stopped!
But at the same time, the keys 6,7,8,9,0 on the keyboard do not work at all :(
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

I'll put in a switch for the Joystick - which type of ZXUNO do you have? joystick works well on other boards. Is it a different dev board?

If you view a SAM keyboard, the F0-F9 keys are to the right - where the numeric keypad is on a standard keyboard. Of course I can move then to the Fx keys, or perhaps duplicate them, but @Pegaz and I discussed and decided to represent the SAM keyboard over the PC one.
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: SAM-Coupe new core

Post by azesmbog »

Returned the keyboard to the original code (removed joy)
The keys "6-0" immediately appeared and the "0" stopped sticking
The joystick port needs to be redone.
Joysticks I have two Sega MD, both working. It's not about them. Stuck even with unplugged.
And the joystick in SamCoupe is located on port #FF and should not intersect with buttons 6-0
Image
Or I'm wrong?
Is the joystick connected parallel to the cursor keys? but certainly not to 6-0
zxmicrojack
Drutt
Posts: 36
Joined: Tue Aug 04, 2020 7:29 pm

Re: SAM-Coupe new core

Post by zxmicrojack »

I'm not sure what issue you are having with the joystick, I will put in a switch so you switch them off. So far you are the only person who reported it which is why I ask you which board you are running the core on. Kindly let me know then I can investigate. The Joystick works perfectly on mine and other boards. There is some odd timing issue with this core which existed prior to me taking it on, and I've reduced somewhat so as to make the core usable, but I'm aware it still exists in some form. I'm working to remove it right now. The table you show and the description you've given - naturally when implementing it, I referred to that and more documentation, as well as observing the schematic. Joystick 1 maps onto the keyboard keys 6-0, with Joystick 2 on 1-5.
Standard 9 pin 'D' type plug. The joystick interface has standard ATARI
connections except that it has an extra strobe line for a second
joystick together with a line carrying 5 volts. MGT will allow for dual
joystick control with the second joystick having a special plug-socket
connector. The joystick is read by the Key-board port (254 dec) and
overlays numeric keys 1 to 5 for second joystick and 6 to 0 for the
first joystick
From the SAM Coupe technical manual. Not sure where the port #FF comes from, maybe there's a joystick interface I'm unaware of.

So please let me know which ZXUno you have, and help me debug the issue.

As ever, I stand ready to help.
AndyC
Dynamite Dan
Posts: 1417
Joined: Mon Nov 13, 2017 5:12 am

Re: SAM-Coupe new core

Post by AndyC »

Aren't MD pads slightly off the Atari standard, in order that they could support extra buttons? Are you sure they're SAM compatible?
Post Reply