Jump to content

nanochess

Members
  • Content Count

    6,415
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by nanochess


  1. 1 minute ago, Milli Vee said:

    Does anyone know how many cycles I have to work with when the VDP triggers an NMI and when it starts the next screen? I don't want to overload my NMI routine too much and stomp on  the VDP.

    It is easy to calculate.

     

    As the Z80 works at 3.58 mhz, you have 3579545 cycles to work.

     

    You should divide this number between 60 (the number of video frames per second on a NTSC console) 3579545 / 60 = 59659 clock cycles per video frame.

     

    Each NOP instruction take five cycles so you can execute a total of 11931 NOP instructions before the interrupt is generated again.

     

    This page contains the total cycles for each instruction: (use the Timing Z80+M1 column)

     

    http://map.grauw.nl/resources/z80instr.php

     

    Some games do everything inside the NMI vector, so the main loop is just a jump over itself.

     

    Other games only update the VDP while inside the NMI vector, so you must leave enough cycles for the game processing code. I use this kind of logic in my games Princess Quest, Mecha-8, and Mecha-9.

     

    And some games only do everything outside of the NMI vector, and use Z80 loops, and don't even synchronize with it.

     

    • Like 2

  2. 2 hours ago, Gray Defender said:

    Amazing article! The Awards are well deserved!  Such great ports, you and the team should be proud!

    Thank you! This reminds me that I need to take a picture of the award along the game!

    • Like 1

  3. 1 hour ago, sramirez2008 said:

    I don't normally purchase the same game for multiple consoles, but in this case I had to make an exception.  This is one great game.👍

     

    <Edit> You had me at the 2017 PRGE wip.

     

    Aardvark.jpg

    Amazing! 😮 Thank you!

    • Like 1

  4. 12 hours ago, carlsson said:

    I read that comment from Nanochess and I wonder what he means. Take any GRAM card that is 8x8 or 8x16 pixels (some MOBs). As far as I can tell, every bit is used to its maximum in the GRAM memory. I think he meant the BACKTAB where the two upper bits are unused and can be used to store additional data. Those two bits are not involved in selection of which GROM/GRAM to display.

     

    Edit: Unless of course the reference was to bits 9-10 which form address bits 7-8 in selecting GROM in CS mode, but per the stic.txt mentioned above are ignored for GRAM and BG/FG mode. It might very well be so that the BACKTAB holds all 16 bits and that the CPU can read all of it, but since STIC won't bother about bits 9-10 as long as bit 11 is set, you have a total of 4 bits (9, 10, 14, 15) to store additional information as long as you use GRAM. On an expanded console with 1K or 2K GRAM, the bits 9 and 10 would apparently be used by the STIC which means BACKTAB would contain garbage if you at the same time tried to use those two bits for own information.

    I was thinking on Utopia, I remember reading invnut's Utopia Revealed!

     

     

     

    • Like 1

  5. Just made IntyColor to support the expanded GRAM by using the -t option. Notice the only mode that can access the 256 GRAM cards is the Color Stack mode.

     

    As always the source code is at https://github.com/nanochess/IntyColor

     

    Let me show also a tiny example using the cutegirl.bmp file (from my previous demo to test for Tutorvision/Super Pro systems):

    ./intycolor -b -s0707 -t cutegirl.bmp cutegirl.bas
    ./intybasic cutegirl.bas cutegirl.asm
    ./as1600 -o cutegirl cutegirl.asm
    ./jzintv -z3 -G2 cutegirl

     

    For jzintv is very important the uppercase G, otherwise with the lowercase g it tries to load a strange GROM file.

     

     

    IntyColor_v1.2.0.zip cutegirl.bmp

    • Like 2

  6. On 4/7/2021 at 12:37 PM, Peripheral said:

    How are we supposed to know which games benefit from ECS and/or ivoice?

     

    Running jzintv's rom2bin on the .rom's typically gives a config file that says things like

     

    ecs = 1

    voice_compat = 1  (or voice = 1, for Mr. Turtle)

     

    From some old threads, I gathered that "ecs = 1" is conservative, and should probably

    be replaced with ecs_compat.  So I was guessing that the contest entries do not use ECS.

     

    And I guessed Mr. Turtle was the only one using ivoice.

     

    But from this award, it seems Infiltrator can also use ECS and/or ivoice.

     

    So which contest entries can use ECS and/or ivoice?

     

    And going forward, is there a way to determine this on our own?

     

    thanks!

    Both Infiltrator and The Pandora's Incident can use the extra sound chip on the ECS.

     

    It is indicated in the posts made by the author. It is easy to tell by yourself if you run jzintv with and without ECS support (and you have good ear).

     

    We knew Mr. Turtle had voice because the author showed it in the video he made. Also you need to run jzintv with voice support.

     

    If the author doesn't tell us, it is not immediately obvious if ECS or voice is used.

     

    I remember running Bomb Squad on emulator and never hearing the voice nor missing it because I didn't knew it had voice!

     

     


  7. It is easier to consider a certain X or Y coordinate over a threshold to confirmate if your sprite is touching the border.

     

    For example if using a fractional movement and an imaginary 4 pixel border around with a 16x16 sprite:

     

    IF #x < $0400 THEN ' left border exceeded

        new_room = -1

    ELSEIF #x > $9400 THEN ' right border exceeded

        new_room = 1

    ELSEIF #y < $0400 THEN ' top border exceeded

        new_room = -10

    ELSEIF #y > $5400 THEN 'bottom border exceeded

        new_room = 10

    END IF

     

    The variable new_room could be zero when the room isn't changing. You need good collision check with walls to avoid passing impossible paths from room to room.

     

    Typically the card detection is something like this:

     

        #c = #backtab((#y / 256 + 0 ) / 8 * 20 + (#x / 256 + 0) / 8))    ' For top left, the plus zero expression is to adjust the offset if checking other corners, in this case top left

     

    When handling a map with multirooms, you need a table of cards to walls.

     

    For example:

     

        IF collision_room(room * 24 + (#c AND $01f8) / 8 ) <> 0 THEN  ' We have a collision

     

    Supposing there are only 24 cards per screen. And you'll fill manually the DATA table for collision_room (24 values for each room).

     

    The collision handling is highly dependent on the game. For example, if you have speed variables you could make the player to reboot, or simply adjust the X,Y coordinates to be outside the collision.

     

     

     

     

    • Thanks 1

  8. Modulo is an expensive operation in terms of time.

     

    The second half of the code recalculates several things unnecessarily:

     

    imap = 0+mX + ((1+mY)%hMAP)*wMAP
    	#i = map(imap)  + #j
    	SCREEN #xyrooms,#i + tX 			, 0 + (9-tY)*20	,9-tX,1+tY,9
    
    	imap = (1+mX)%wMAP + ((1+mY)%hMAP)*wMAP
    	#i = map(imap)  + #j
    	SCREEN #xyrooms,#i      			, 9-tX+(9-tY)*20,9   ,1+tY,9
    
    	imap = (2+mX)%wMAP + ((1+mY)%hMAP)*wMAP
    	#i = map(imap)  + #j
    	SCREEN #xyrooms,#i      			,18-tX+(9-tY)*20,tX+1,1+tY,9
    

    I would do it as:

     

    IF mY = hMAP - 1 THEN mY = 0 ELSE mY = mY + 1

    imap = mX + mY * wMAP

    #i = map(imap) + #j

    SCREEN #xyrooms,#i + tX , 0 + (9-tY)*20 ,9-tX,1+tY,9

    IF mX = hMAP - 1 THEN imap = imap - (hMAP - 1) ELSE imap = imap + 1

    #i = map(imap) + #j

    SCREEN #xyrooms,#i , 9-tX+(9-tY)*20,9 ,1+tY,9

    IF mX = hMAP - 2 THEN imap = imap - (hMAP - 1) ELSE imap = imap + 1

    #i = map(imap) + #j

    SCREEN #xyrooms,#i ,18-tX+(9-tY)*20,tX+1,1+tY,9

    • Like 1

  9. 4 hours ago, carlsson said:

    By the way, is there a reason or is it a mistake that the price if you buy from Lulu in French or German is 30% lower than if you buy it in English (US)? That is before shipping, which is roughly the same for both options. I seem to recall something similar was true about your first book too, much cheaper on Lulu if bought from what appears to be an EU printer than an US printer.

    Didn't knew about this. I'll give a look. Supposedly I set a price and it is translated automatically.

     

    Edit: just revised and Lulu had some strange numbers for the other currencies. I put again the USD price and all changed accordingly. Not sure what happened but indeed the price was lower.


  10. 1 hour ago, Mik's Arcade said:

    i know you get plenty of appreciation on this forum, but I just wanted to thank you again for all this effort.

     

    The intellivision is by far my fondest video game memories from my childhood. I came from a relatively poor family and everyone had an Atari. I used to have to go to their houses to play games. Then my upstairs neighbor had the Intellivision and I was hooked. And then me and my brothers all worked odd jobs and pooled our money and ultimately got our own Intellivision. Such a great system and library

     

    So, to be able to tinker around and try to program games for Intellvision is really like me being able to relive my childhood.  It's almost therapeutic!

     

    PS....I recently watched the Queen's Gambit on Netflix, so I'm totally digging the Kilobyte's Gambit

    Thank you for sharing!

     

    Coincidentally my neighbor downstairs also had an Intellivision when I was age 5, but I wasn't allowed to touch it because I had a history of breaking controllers 😅

     

    So talking about a "must have" that keep until the adult age 😉 glad you are enjoying it!

     

    PS. Haha you saw the chess games!

     

×
×
  • Create New...