- Top Stats

Top Posters Top Topic Starters Top Topics
Bryce 5286
TFM 2507
Gryzor 2256
arnoldemu 1273
TotO 1186
Bryce 90
arnoldemu 70
Gryzor 42
LambdaMike... 37
CraigsBar 35
Amstrad CPC WiFi - 288002 Views Duke 09:36, 07 May 16
CPC Plus cartr... - 209740 Views gerald 17:39, 01 November 14
ACID chip inside - 81956 Views MacDeath 15:52, 23 October 09
Gotek USB in a... - 70797 Views gryzor 18:01, 18 March 14
Pros & Con... - 58846 Views CPCIak 15:07, 11 May 10


Author Topic: CPC Plus cartridge replacement : one more  (Read 209741 times)

0 Members and 1 Guest are viewing this topic.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.331
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2244
Re: CPC Plus cartridge replacement : one more
« Reply #400 on: 20:11, 26 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

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.346
  • Liked: 964
Re: CPC Plus cartridge replacement : one more
« Reply #401 on: 20:48, 26 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  ;)

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1977
Re: CPC Plus cartridge replacement : one more
« Reply #402 on: 20:51, 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

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.756
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3745
Re: CPC Plus cartridge replacement : one more
« Reply #403 on: 21:11, 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.

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.346
  • Liked: 964
Re: CPC Plus cartridge replacement : one more
« Reply #404 on: 21:20, 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 ....

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 10.756
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3745
Re: CPC Plus cartridge replacement : one more
« Reply #405 on: 21:39, 26 March 15 »
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.

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.346
  • Liked: 964
Pro Tennis Court
« Reply #406 on: 22: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.
 [ Invalid Attachment ]

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.

« Last Edit: 10:09, 27 March 15 by gerald »

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.327
  • Country: es
  • Liked: 558
Re: CPC Plus cartridge replacement : one more
« Reply #407 on: 23:02, 26 March 15 »
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?).
« Last Edit: 23:48, 26 March 15 by dragon »

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.238
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1153
Re: CPC Plus cartridge replacement : one more
« Reply #408 on: 00:41, 27 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.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.331
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2244
Re: Pro Tennis Court
« Reply #409 on: 10:51, 27 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.
 [ Invalid Attachment ]

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.
« Last Edit: 10:52, 27 March 15 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline MacDeath

  • Chaotic post writer and mock-up specialist
  • Supporter
  • 6128 Plus
  • *
  • Posts: 4.038
  • Country: fr
  • Liked: 1108
Re: CPC Plus cartridge replacement : one more
« Reply #410 on: 00:33, 28 March 15 »
just blow in the cartridge...  :laugh:

Offline fgbrain

  • CPC6128
  • ****
  • Posts: 216
  • Country: gr
    • index.php?action=treasury
    • Chaos CPC Homepage
  • Liked: 110
Re: CPC Plus cartridge replacement : one more
« Reply #411 on: 10:29, 28 March 15 »
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.

Offline yurif74

  • CPC664
  • ***
  • Posts: 52
  • Country: it
  • Liked: 16
Re: CPC Plus cartridge replacement : one more
« Reply #412 on: 13:02, 28 March 15 »
Really anxious to receive mine too  ;D

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.346
  • Liked: 964
Re: CPC Plus cartridge replacement : one more
« Reply #413 on: 15:30, 28 March 15 »
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  ;)

« Last Edit: 20:31, 28 March 15 by gerald »

Offline radu14m

  • 464 Plus
  • *****
  • Posts: 390
  • Country: ro
  • Follow your dreams and believe !
  • Liked: 66
Re: CPC Plus cartridge replacement : one more
« Reply #414 on: 17:13, 28 March 15 »
nobody can upload a youtube movie?
i want to see how the "beast" is running :)

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.131
  • Country: gb
  • Liked: 1647
Re: CPC Plus cartridge replacement : one more
« Reply #415 on: 17:30, 28 March 15 »
Do the trained versions of Navy Seals cpr's I made work ok on this? I've only tested (used) them with WinApe?

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

I'd love to see that too.  :D

Offline EamonShoot

  • CPC464
  • **
  • Posts: 4
  • Country: gb
  • Liked: 0
Re: CPC Plus cartridge replacement : one more
« Reply #416 on: 19:46, 28 March 15 »
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  ;)

Offline Maniac

  • CPC6128
  • ****
  • Posts: 163
  • Country: gb
  • Liked: 65
Re: CPC Plus cartridge replacement : one more
« Reply #417 on: 19:48, 28 March 15 »
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!!

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.346
  • Liked: 964
Re: CPC Plus cartridge replacement : one more
« Reply #418 on: 20:03, 28 March 15 »
Mine arrived yesterday and works brilliantly - well done Gerald!
That was fast  :o

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.

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 954
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 690
Re: CPC Plus cartridge replacement : one more
« Reply #419 on: 20:45, 28 March 15 »
@gerald : no news for me  :blank:
_____________________

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


Amstrad Plus French Forum

All friends are welcomed !

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.346
  • Liked: 964
Re: CPC Plus cartridge replacement : one more
« Reply #420 on: 21:18, 28 March 15 »

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 954
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 690
Re: CPC Plus cartridge replacement : one more
« Reply #421 on: 21:41, 28 March 15 »
No problem...
As was singing jenifer lopez 'waiting for tonight' :D

_____________________

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


Amstrad Plus French Forum

All friends are welcomed !

Offline seanb

  • Supporter
  • 6128 Plus
  • *
  • Posts: 630
  • Country: gb
  • Captain Wrong
  • Liked: 234
Re: CPC Plus cartridge replacement : one more
« Reply #422 on: 02:50, 29 March 15 »
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!

Offline Maniac

  • CPC6128
  • ****
  • Posts: 163
  • Country: gb
  • Liked: 65
CPC Plus cartridge replacement : one more
« Reply #423 on: 01:46, 30 March 15 »
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
« Last Edit: 09:10, 30 March 15 by Maniac »

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.112
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 930
Re: CPC Plus cartridge replacement : one more
« Reply #424 on: 10:01, 30 March 15 »
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