Commodore 16 / Plus4 Core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

PhantombrainM
Atari freak
Atari freak
Posts: 62
Joined: Fri Mar 16, 2018 9:10 am

Commodore 16 / Plus4 Core

Postby PhantombrainM » Thu May 03, 2018 7:29 pm

This Topic is for C16/+4 FPGA Questions.

I'll start right away.
The changelog shows that a reset has been improved. What was the original problem?

I have noticed that a reset always erases the memory.
If I press Runstop while doing a reset to land in the built-in machine language monitor and enter M1000, no content can be found. Also you don't get into the Basic with X any more but get a "Break Error".

Just to be clear: Many games have a reset protection built in for this reason. So it is possible that the problem that was fixed was correct. In this case, only switching the C16 on/off or implementing a "hard reset" will help.

regards,
PhantombrainM
Two beer or not two beer? - Shakesbeer.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri May 04, 2018 2:00 am

Originally C16 core was hard to reset. 50% of resets locked the computer. It had no relation to game protection as it happens on empty computer.

Actually i've added memory erase when i had 16/64KB switch to let Basic recognize 64KB after 16KB. Now it's always 64KB (16KB mode is pretty useless), so probably memory clear is not required anymore.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri May 04, 2018 3:11 am

I've found that C16 need more options..
game like Majesty of Sprites doesn't like NTSC clock. I've thought it won't hurt since PAL and NTSC clocks are very close.
JiffyDOS in C16 gives incompatibilities, so it's better to have switch at least for Kernel ROM.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri May 04, 2018 4:17 am

I'm not familiar with C16. It seems there is a port to switch between PAL/NTSC directly from application. Is it standard C16 feature or just core addition?

PhantombrainM
Atari freak
Atari freak
Posts: 62
Joined: Fri Mar 16, 2018 9:10 am

Re: Commodore 16 / Plus4 Core

Postby PhantombrainM » Fri May 04, 2018 7:17 am

The C16 / Plus4 cannot be switched between PAL and NTSC. You'd need different MOS chips inside for that.

Is it currently running in NTSC mode?

I also noticed some freezing in some games.
"MAC, I" or "Mad Mamba" (all packed from 1988 CST, if you enter LIST).

Maybe that's because of the NTSC mode you mentioned?
By the way, I don't know any NTSC only games. So PAL Mode would be preferred.

If you have questions about the C16, I had one as a kid for eight years. I also have a real one standing here. Don't hesitate to ask me!

As for jumping to the machine language editor while keeping runstop pressed during reset, this is not so important but would be a nice addition.
You could use it to make a memory dump (not so important anymore as alls software is preserved) or to enter a cheat code and then go back into the game.

For Example Aadvark:
https://www.consoledatabase.com/cheats/ ... /aardvark/
(It's not working right now because memory is empty when entering the Monitor.)

regards
PhantombrainM

PS: By the way there is FPGATED V1.1 available and release notes in 1.01 mentions some reset problems have been fixed.
Documents of MISTer say V1.0 is used right now? All in all release notes seem not to be very interesting though. So I don't know if its worth the work to switch: https://hackaday.io/project/11460-fpgated
Two beer or not two beer? - Shakesbeer.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri May 04, 2018 7:38 am

Ah, thanks for v1.01 news. I will check it.

I will set PAL clock and will provide PAL/NTSC automatic clock switch since TED has specific register (FF07) to switch between NTSC/PAL. So with different kernal ROM (PAL/NTSC) it will work with correct clock.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri May 04, 2018 4:57 pm

Update should fix discussed problems.

PhantombrainM
Atari freak
Atari freak
Posts: 62
Joined: Fri Mar 16, 2018 9:10 am

Re: Commodore 16 / Plus4 Core

Postby PhantombrainM » Fri May 04, 2018 9:22 pm

Thank you! :)

Minor bug: If you don't provide a boot.rom, reset from GUI doesn't work anymore. (delete boot.rom from c16 folder)

regards,
PhantombrainM
Two beer or not two beer? - Shakesbeer.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Sat May 05, 2018 7:29 am

The issue is in MiSTer binary.
I will fix it.

PhantombrainM
Atari freak
Atari freak
Posts: 62
Joined: Fri Mar 16, 2018 9:10 am

Re: Commodore 16 / Plus4 Core

Postby PhantombrainM » Thu Aug 30, 2018 3:59 pm

New release breaks Jiffy completely.
Two beer or not two beer? - Shakesbeer.

NML32
Atari Super Hero
Atari Super Hero
Posts: 526
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Commodore 16 / Plus4 Core

Postby NML32 » Thu Aug 30, 2018 9:30 pm

PhantombrainM wrote:New release breaks Jiffy completely.

I noticed that as well. I had to remove it for now.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri Aug 31, 2018 12:23 pm

should be fixed in new release

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri Aug 31, 2018 1:51 pm

The main fight for correct timing was between game Pet Rescue with its fast loader and JiffyDOS.
Hopefully i've fixed both in the latest update.

PhantombrainM
Atari freak
Atari freak
Posts: 62
Joined: Fri Mar 16, 2018 9:10 am

Re: Commodore 16 / Plus4 Core

Postby PhantombrainM » Fri Aug 31, 2018 2:45 pm

Pet Rescue is working! Wow.

I have tried it with stock rom, then reset the c16 and switched to jiffy. Pet Rescue wasn't working after the Start Option in Main Menu.
Then I reloaded the whole core and startet directly with jiffy and pet rescue was working with it. Strange.

If you want, I can check against my real c16 (+64K) and switchable jiffy eeprom.

Otherwise directory loading with jiffy seems stable now and better then ever!

Interestingly a lot of games still do not decompress correctly and hang up.
MAC I, Mad Mamba, Robin to the Rescue (12k File), .... I would have bet my leg it's CPU related but since you switched it and it's still a problem this must be some other timing thing.

Interestingly part two: If I run the game on my real C16 (for example mad mamba) and then save it with built in C16 Monitor then it also runs on the MISTer(!). So it's just a decompression problem and writing / reading to the memory. If you want I can give you a saved decompressed file to check against.

regards,
PhantombrainM
Two beer or not two beer? - Shakesbeer.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Fri Aug 31, 2018 6:10 pm

I need help to identify which CPU instruction(s) are preventing de-compressor to work. Then i will try to fix it in the core.

Many C64 games are compressed and i don't remember any non-working game there due to compression.
May be it's really something else.
May be it depends on C16 memory expansion?

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2586
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Commodore 16 / Plus4 Core

Postby Sorgelig » Sat Sep 01, 2018 6:38 pm

New release should fix loading of compressed PRG.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 4 guests