WIP: Reversi

Talk about programming of homebrew games only.
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: WIP: Reversi

Post by carlsson » Tue May 07, 2013 3:00 pm

I think the wrong blink colour is part of the hack to add a two player mode. I've had a bit of headache getting it to work, and believe setting the cursor colour will be another change/check/special case in line with those I already made. It shouldn't blink faster than before...
User avatar
MADrigal
Site Admin
Posts: 1189
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: WIP: Reversi

Post by MADrigal » Tue May 07, 2013 3:06 pm

No it doesn't blink faster... seems to me that it MOVES faster when you press the joystick... or was it because of the fact that I sometimes pressed on the keyboard? Hm... i dont remember :-D

ps i asked Mobsie to contact you, he might want to share his ideas about the joystick-only inputs :-)
User avatar
Mobsie
Posts: 708
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: WIP: Reversi

Post by Mobsie » Tue May 07, 2013 3:19 pm

Hi Carlsson,

yes i read also $11 for my game.
I do the quick and dirty method at the moment.
(Later i will use only JMP because it use only 3 cycles, both jump use 6 together, the jsr and rts use 6 each!)

MovePlayer
LDX $11 ; Joy
CPX #%01000101
bne MovePlayer1
jsr trap2
rts
MovePlayer1
CPX #%01001101
bne MovePlayer2
jsr trap1
rts
MovePlayer2
CPX #%01001001
bne MovePlayer3
jsr trap3
rts
MovePlayer3
CPX #%01000001
bne MovePlayer4
jsr trap4
rts

Mobsie
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: WIP: Reversi

Post by carlsson » Tue May 07, 2013 5:07 pm

Aha! Now I know what is happening. I forgot AND #$80 when reading $19 and $1B. Still, the other method is more safe.
User avatar
Mobsie
Posts: 708
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: WIP: Reversi

Post by Mobsie » Wed May 08, 2013 5:23 pm

Hi Carlsson,
i like your Work. Great Game.
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: WIP: Reversi (was Othello)

Post by carlsson » Wed May 08, 2013 10:04 pm

MADrigal wrote:Please notice that the lower 16K and higher 16K must be SWAPPED. That's the way Giovanni designed the logic of that PCB.

And you should also "mirror" ROM banks to match the way CreatiVision "sees" data. Mirroring depends on the ROM size. Please refer to the attached image.
So in case I have two programs, 4K and 8K that I want to insert on my Diagnosticart, I should prepare the binary file as following?

Slot 1
4K empty
4K mirrorerd program
4K empty
4K actual program
16K empty

Slot 2
8K mirrored program
8K program
16K empty

Slot 3
32K empty

Slot 4
32K empty
User avatar
MADrigal
Site Admin
Posts: 1189
Joined: Sun Sep 15, 2013 1:00 pm
Contact:

Re: WIP: Reversi (was Othello)

Post by MADrigal » Wed May 08, 2013 10:33 pm

> So in case I have two programs, 4K and 8K that I want to insert on my Diagnosticart,
> I should prepare the binary file as following?
> ...

Yes that's all correct but I suggest you do "mirror" data wherever it's possible, that's what we did on our Multicart ROM files. For example Crazy Chicky (4K) is:

4K program
4K program
4K program
4K program
16K empty

and Auto Chase (8K) is:

8K program
8K program
16K empty

I know it might sound a bit "useless", but you'll make 100% sure that the ROM program will work fine :-)
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: WIP: Reversi

Post by carlsson » Wed May 08, 2013 11:03 pm

I just programmed my first EPROM. Results are mixed: it works perhaps 95% but it has random graphic glitches. Some characters are plotted at odd locations, and sometimes when I press reset, the colours and graphics are completely wrong. I wonder if there is an additional bit of VDP setup that I have forgotten, or that I made some mistakes in my routines. Maybe I should mirror it four times like you're suggesting.

http://www.youtube.com/watch?v=YtKgTgD6QHQ

In any case, the music seems to play fine and the LFSR bass appears to sound one octave lower than it does in FunnyMu. I'm unsure if that applies to the other voices as well.

The other 8K program I was talking about is a still unpublished co-op by me and TBCTBC. However that program bails out terribly on a real Creativision, at best I can get an output that almost resembles what it should look like (compared to emulation). We'll need to diagnose and investigate that, but unfortunately I don't think we'll have the time to do it this week. :(
User avatar
carlsson
Posts: 507
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: WIP: Reversi

Post by carlsson » Thu May 09, 2013 6:37 am

One thought I had last night was that the interrupt routine accesses the VDP to blink the sprite, while the main program also accesses the VDP. What happens if the main program just set up the VDP, then an interrupt occurs that changes the VDP address, exits and the main program continues?

However the sprite blinking only happens while playing a game, in demo mode the interrupt routine never touches the VDP and the graphic glitches appear anyhow. I'll try to disable the blinking anyway and see if there is a difference.

Another idea is that the OTP EPROM in the Diagnosticart is labeled 27C1001 10B1 while most of the erasable ones I've got are 27C1001 20F1. I've got one chip labeled 27C1001 12F6. Would the 10, 12, 20 be access speed in ns, just like on older, smaller EPROMs? Would the Diagnoticart or the Creativision itself have problems with 20 ns EPROMs? Then again, I would figure the program would rather crash than emit graphical glitches.

My third idea is to program one of my EPROMs with four known good BIN images of existing games, and see if they play well. If that works, the problem must lie in my code.

Edit: Disabling blinking in the interrupt makes no difference. The glitches are random and only occur sparsely. Once in a blue moon, everything looks like it should, after a couple of resets.
User avatar
Scouter3d
Posts: 646
Joined: Mon Jun 28, 2010 7:02 am
Location: Wien
Contact:

Re: WIP: Reversi

Post by Scouter3d » Thu May 09, 2013 7:39 am

Hi Carlsson,

I will burn Reversi onto a 2532 and will try it in my socketed cartridge (was a defect "Crazy Chicky")... worked well with airsea attack... so should work with reversi too.

Greetings TOM:-)
Post Reply