News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

CPC Plus cartridge replacement : one more

Started by gerald, 16:39, 01 November 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Are you interested in buying a 3D-printed case for the cartridge? Hoe many units? (only vote if you want one or more!)

1
178 (85.2%)
2
25 (12%)
3
2 (1%)
4
0 (0%)
5
0 (0%)
more
4 (1.9%)

Total Members Voted: 209

arnoldemu

Quote from: Ast on 17:03, 25 March 15
Have you an example to show?
yes.

the code is in progress.

The code will have:
1. common code with a "define" that chooses disc or cart version
2. disc specific boot loader
3. cart specific boot loader
4. showing some features of the plus but using "debug" graphics for demonstration reasons (I'm not an artist or musician ;) ).

Of course the code will need to be built for disc and then for cart. You can run each and compare.

My example will show how the cart can be used in a similar way to 128KB. This means that 64KB carts don't need to have less features than the comparable 128KB disc game.

It doesn't show how to take an existing 128KB game and make it work on 64KB cart compatible with GX4000. If I convert one of those games I'll tell you then what I have done.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

gerald

Quote from: dragon on 21:02, 25 March 15
No exit not work in my cartridge someone else has tried ?.
Try the attached cpr. I've fixed No exit so its start all time. Using the stack before initialising it is a bad bad bad bad ( really bad) thing  ;)

TFM

Quote from: arnoldemu on 19:07, 26 March 15
You're using double buffered overscan screens?


Sometimes only. Depends if the game can keep up with 50 fps smooth scrolling or not. The number of sprites is the critical factor. I don't like small screens, why not using all screen area if it is there. On the other hand, sometimes two screens of 16 KB allow quick sprite routines. It's always a trade off somehow, and that's what makes game coding on the CPC so much fun. On a modern PC everybody can do.  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Bryce

Quote from: gerald on 19:48, 26 March 15
Try the attached cpr. I've fixed No exit so its start all time. Using the stack before initialising it is a bad bad bad bad ( really bad) thing  ;)

So the original was doing something that you shouldn't do?

Bryce.

gerald

Quote from: Bryce on 20:11, 26 March 15
So the original was doing something that you shouldn't do?

Bryce.
Well,  I do not own the original, but a available cpr does not initialise its stack before doing the 1st call.
When the push goes in the ram under the ROM, then the pop return the ROM content ....

Bryce

That's probably a copy of the original then and would explain why it always had problems. Looking forward to finally try the game out :)

Bryce.

gerald

#406
I had a look at Pro Tennis Court that do not start every time on my GX4000.

Here is where the game get stuck : this is the early init of the game where it wait for a vsync.
[attach=2]

1 - set the interrupt vector to jump to 0x191e (ret)
2 - wait for vsync bit  : loop (0x18ff-1902)
3 - enable irq, halt, disable irq
4 - wait for vsync bit  : loop (0x190b-190e)
5 - set the interrupt vector to jump to 0x21d2 (ret)
6 - set irq mode to IM1

So what is wrong with that : setting interrupt mode after enabling interrupt !
At reset, the Z80 is in IM0 mode, where IRQ ack cycle fetch one byte on the bus and EXECUTE it.

Here the ack cycle occurs during the EI HALT DI just between the HALT and DI. This happen as soon as the EI since the IRQ is pending since a long time.

Using a logic analyser, I compared case when game started or not.
- In the good case, the irq ack fetch 0xf6, which is OR imm, where imm will be the DI opcode. That OK as A is not used afterwad
- In the failing case, the irq ack fetch 0x06, which is LD B,imm , where imm is the DI opcode (f3). And that bad as the next IN A, (C)  will poll a wrong port.

Now I just wondering why the bad case happen on my GX4000 where It seems to not happen on my 6128
0xf6 / 0x06 are driven by the asic for vectored (IM2) irq. The 3 lower bit indicate the IRQ source (6 = raster), the 5 upper bit of the word is user programmable, but it looks it is NOT initialised at reset.


dragon

#407
Esentially the plus and gx4000 are the same.( the asic is not different). But the configuratión is diferent, maybe some resistance  working as interruptor o someone can affect asic.

I not tried this game in the flash and the gx4000 ,but my original cart works in my gx4000.


I'm going to get the console to try.

I try pro tenis tour in my gx4000 with your cartridge, it works. I think the problem is in your console (motherboard revision maybe?).

CraigsBar

Quote from: arnoldemu on 19:07, 26 March 15
Was this the one that failed if you had a rom board attached?
Or was it the one that didn't switch the stack?

Stack at reset is ffff or something like that, but rom is mapped here.
pro tennis tour does not boot with anything on the plus expansion port. I never noticed that with other carts tho.
IRC:  #Retro4All on Freenode

arnoldemu

#409
Quote from: gerald on 21:50, 26 March 15
I had a look at Pro Tennis Court that do not start every time on my GX4000.

Here is where the game get stuck : this is the early init of the game where it wait for a vsync.
[attach=2]

1 - set the interrupt vector to jump to 0x191e (ret)
2 - wait for vsync bit  : loop (0x18ff-1902)
3 - enable irq, halt, disable irq
4 - wait for vsync bit  : loop (0x190b-190e)
5 - set the interrupt vector to jump to 0x21d2 (ret)
6 - set irq mode to IM1

So what is wrong with that : setting interrupt mode after enabling interrupt !
At reset, the Z80 is in IM0 mode, where IRQ ack cycle fetch one byte on the bus and EXECUTE it.

Here the ack cycle occurs during the EI HALT DI just between the HALT and DI. This happen as soon as the EI since the IRQ is pending since a long time.

Using a logic analyser, I compared case when game started or not.
- In the good case, the irq ack fetch 0xf6, which is OR imm, where imm will be the DI opcode. That OK as A is not used afterwad
- In the failing case, the irq ack fetch 0x06, which is LD B,imm , where imm is the DI opcode (f3). And that bad as the next IN A, (C)  will poll a wrong port.

Now I just wondering why the bad case happen on my GX4000 where It seems to not happen on my 6128
0xf6 / 0x06 are driven by the asic for vectored (IM2) irq. The 3 lower bit indicate the IRQ source (6 = raster), the 5 upper bit of the word is user programmable, but it looks it is NOT initialised at reset.
Only bit 0 is initialised at reset time. The rest is random.

Perhaps the bits may go to f after a power on and then decay... never tested that.

EDIT: I think I initialise asic registers to random in my wip of arnold.

Not sure.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

MacDeath


fgbrain

Is there any reason why this super cartridge is not yet in the front page of the wiki??? :(

..really anxious to receive mine!!!

HINT: I have a wip for the plus!! Someone needs ages to draw so nothing yet to preview!

Can't imagine yet how better the cartridge version can be...

At last, thanks to master Gerald, we have the right tool now to test!
_____

6128 (UK keyboard, Crtc type 0/2), 6128+ (UK keyboard), 3.5" and 5.25" drives, Reset switch and Digiblaster (selfmade), Inicron Romram box, Bryce Megaflash, SVideo & PS/2 mouse, , Magnum Lightgun, X-MEM, X4 Board, C4CPC, Multiface2 X4, RTC X4 and Gotek USB Floppy emulator.

yurif74

Really anxious to receive mine too  ;D

gerald

#413
Hi all,

As I will be away for few weeks by mid next week, I have to suspend shipping for this period.
For those that I already contacted but did not answered yet, make sure we can sort the shipping before mid next week, or you will have to wait  ;)


radu14m

nobody can upload a youtube movie?
i want to see how the "beast" is running :)

Phantomz

Do the trained versions of Navy Seals cpr's I made work ok on this? I've only tested (used) them with WinApe?

Quote from: radu14m on 16:13, 28 March 15
nobody can upload a youtube movie?
i want to see how the "beast" is running :)

I'd love to see that too.  :D

EamonShoot

Mine arrived yesterday and works brilliantly - well done Gerald!



Just a quick question - anyway to reset the 6128plus once you have finished playing a game? The normal keyboard reset doesn't work, so having to do a power cycle. No biggie, just wondering? Thanks  ;)

Maniac

I'll try to upload a video this weekend if I get some time. Struggling to find some at the mo inbetween decorating daughters bedroom and F1!!

gerald

Quote from: EamonShoot on 18:46, 28 March 15
Mine arrived yesterday and works brilliantly - well done Gerald!
That was fast  :o

Quote from: EamonShoot on 18:46, 28 March 15
Just a quick question - anyway to reset the 6128plus once you have finished playing a game? The normal keyboard reset doesn't work, so having to do a power cycle. No biggie, just wondering? Thanks  ;)
Reset (CTRL/SHIFT/ESC) is a pure software one. It is also unlikely that a game on cartridge will detect it just to ..... restart itself, no ?
Also, the cartridge emulator need a real power cycle to load a cart as it only see access to a ROM (ie, just address and output enable), not enough to know when the computer reset.

Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !


Ast

No problem...
As was singing jenifer lopez 'waiting for tonight' :D

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

seanb

Well if any of you lucky bastards that have your cartridge ate looking for a case you could adapt this guy's instructions to suit you.
Not a bad end result

SC-3000 Cart Case 14 - The Finished Case - YouTube
Thou shall not question Captain Wrong!

Maniac

#423
For those that are interested I've uploaded a YouTube video of the C4CPC in action. Apologies for some of the camera work! I hope it's useful.


https://youtu.be/2xPAjOGHj2Y

robcfg

I was able to play with it yesterday and it work amazingly good!


It's a pity that most CPC+ games are horrible to play, so I hope we get new games soon  ;D

Powered by SMFPacks Menu Editor Mod