What does the TG-16 do?

Started by Kitsunexus, 12/31/2007, 04:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kitsunexus

Ok, this kinda sounds like a really stupid thread and it probably is, but what does the TG-16 do when the cartridge is inserted and the switch is turned on?

And don't reply "IT PLAYS THE GAME, DUMBASS." I figured THAT much on my own.

What I mean is, when power is applied to the TG-16, what instructions does it execute first? Surely even the TG-16 has a BIOS, so that's loaded first, right? Then would the TG-16 load graphics and shit into it's memory or begin streaming it, or does the game engine code take care of that?

Can somebody give me an event by event list of what the Turbo does when it starts up? This wouldnt be the Turbo cd, just a normal American TG-16.

Does the system do sort of hidden diagnostics? Does it strobe the controller input to see if anything is plugged in? Are there certain varibles that have to come back as 1 or YES or positive or something before the game is played?

It has been boggling me for a week now... :(
Forgive me, my brain is on par with the Bubble System.
THE CHEMICAL BROTHERS RULE!

Keranu

Kitsune, we really need to get you a Turbo system  :mrgreen: .
Quote from: TurboXray on 01/02/2014, 09:21 PMAdding PCE console specific layer on top of that, makes for an interesting challenge (no, not a reference to Ys II).
IMG
Click the banner to learn more about Alex Chiu and his "immortality rings"

Tatsujin

00 initialize rom
10 check the slot
20 hucard unreadable
30 promt the user to revers the hucard
40 check the slot again
50 start the game
www.pcedaisakusen.net - home of your individual PC Engine collection!!
PCE Games countdown: 690/737 (47 to go or 93.6% clear)
PCE Shmups countdown: 111/111 (all clear!!)
Sega does what Nintendon't, but only NEC does better than both together!^^
<Senshi> Tat's i'm going to contact the people of Hard Off and open a store stateside..

TurboXray

Step by step, huh?  :D

 You asked for it...

 The first thing that happens when the CPU is powered on:

 -Map bank $00 to CPU logic address $E000-FFFF, which is MPR 7 (Map register).
 -Since the CPU is in reset state, the CPU jumps to the address in the RESET entry of the interrupt vector table. This is located at $FFFE-FFFF.
 -The most common RESET vector jump address is $E000. In this little scenario, the CPU jumps to $E000.
 -The first instruction is disable interrupts (SEI), usually followed by a NOP (no operation, but wait 2 cycles)
 -Then map in the system work ram bank $F8 to $2000-3FFF, MPR 1. Ram needs to be here since the STACK is hard coded to address $2100-21FF and is needed for interrupt calls and subroutine calling, not to mention indirect addressing via a set of registers located in RAM known as ZeroPage.
 -Once Ram is mapped, you initialize it to all 00's (don't want any left over garbage in there).
 -next to do is initialize the SP register (stack pointer) to #$FF, which is the first entry slot
 -Mapped in the hardware bank $FF to address $0000-1FFFF (MPR 0). This bank, you access the video processor,video encoder, sound registers, interrupt controller, and I/O
 -you probably want to turn off the display now, but you don't have to do this right away.
 -next you start mapping in other banks of program code/data into the rest of the address range (MPR slots).
 -initialize the audio registers from the hardware bank, and then jump into initializing the game/program code

 There is no BIOS on the system or checksum or such. The only difference between the US and JP consoles is that there is a pin that's held high on one system and low on another. US games check this pin (which is part of the I/O port) to test which system the code is booting up on. If the wrong system, then no go. Japanese software doesn't bother to check this pin and is why you can play JP hucards on a US system with a pin converter.

WoodyXP

This stuff is good to know.  When I come home drunk and turn my system on I don't even know this shit is going on.  It's transparent.  That's what makes the Turbo so awesome.  8)
"I bathe in AES carts."

Kitsunexus

#5
Quote from: TurboXray on 12/31/2007, 05:43 AMStep by step, huh?  :D

 You asked for it...

 The first thing that happens when the CPU is powered on:

 -Map bank $00 to CPU logic address $E000-FFFF, which is MPR 7 (Map register).
 -Since the CPU is in reset state, the CPU jumps to the address in the RESET entry of the interrupt vector table. This is located at $FFFE-FFFF.
 -The most common RESET vector jump address is $E000. In this little scenario, the CPU jumps to $E000.
 -The first instruction is disable interrupts (SEI), usually followed by a NOP (no operation, but wait 2 cycles)
 -Then map in the system work ram bank $F8 to $2000-3FFF, MPR 1. Ram needs to be here since the STACK is hard coded to address $2100-21FF and is needed for interrupt calls and subroutine calling, not to mention indirect addressing via a set of registers located in RAM known as ZeroPage.
 -Once Ram is mapped, you initialize it to all 00's (don't want any left over garbage in there).
 -next to do is initialize the SP register (stack pointer) to #$FF, which is the first entry slot
 -Mapped in the hardware bank $FF to address $0000-1FFFF (MPR 0). This bank, you access the video processor,video encoder, sound registers, interrupt controller, and I/O
 -you probably want to turn off the display now, but you don't have to do this right away.
 -next you start mapping in other banks of program code/data into the rest of the address range (MPR slots).
 -initialize the audio registers from the hardware bank, and then jump into initializing the game/program code
Cool, that is EXACTLY  what I wanted to know! Thank you! ^____^

I'm pretty sure the SNES and Genesis don't exactly follow this, but they're similar right?
Forgive me, my brain is on par with the Bubble System.
THE CHEMICAL BROTHERS RULE!

OldTurboBastard

#6
So while we're at it, why does a PC generally take a few seconds to boot up (even just the basic I/O stuff from BIOS, never mind a bloated OS) while most game systems instantaneously boot up?

I always assumed it had to do with the fact that a game system is made for one purpose and does not have to check 16 different card slots, IDE, ram, etc...

what's going on there?
"I saw this wino, he was eating grapes. I was like, "Dude, you have to wait." - hedberg

NecroPhile

This likely isn't a complete reason, but a PC's BIOS has more ports to check (internal and external), more controllers to initialize, and has to assign resources to each component.  In short, it takes longer on a PC because it has more complicated hardware, which is why newer systems all take time to boot up.
Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

OldRover

OldTurboBastard, that is one of the reasons. The PC also does a number of self-diagnostics on power-on, this is called POST. If you ever hear of anyone saying that their "computer failed post", that's what they're referring to. Old consoles don't have a POST step, nor do they have to spend time probing hardware, so they can start up immediately.

Kitsu: The SNES and Genesis have similar startup procedures, yes. The hardware goes through a few initialization steps and then jumps to the start of the program code in ROM. mal probably knows the exact procedures involved. :D
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

MissaFX

Are the system cards like a BIOS for the CD unit?  Or are they just some kind of higher level software that can be used to control it?
Good Traders: nat+, The Old Rover+, bust3dstr8+, nectarsis, geepee+, Mithos, zeon, sensei+, Windancer, OldSchoolGamer
35/62 FX games owned - 56.4%
05/62 FX games reviewed - 8.0%
Latest: Pachio-kun FX review - 4/9/08

Kitsunexus

Quote from: Missa on 01/01/2008, 04:36 AMAre the system cards like a BIOS for the CD unit?  Or are they just some kind of higher level software that can be used to control it?
According to this thread, they are both.
Forgive me, my brain is on par with the Bubble System.
THE CHEMICAL BROTHERS RULE!

OldTurboBastard

Old Rover thanks for the info. I looked up POST that explains a few things
"I saw this wino, he was eating grapes. I was like, "Dude, you have to wait." - hedberg

Odonadon

Quote from: OldRover on 12/31/2007, 11:18 PMOldTurboBastard, that is one of the reasons. The PC also does a number of self-diagnostics on power-on, this is called POST. If you ever hear of anyone saying that their "computer failed post", that's what they're referring to. Old consoles don't have a POST step, nor do they have to spend time probing hardware, so they can start up immediately.
In addition, hardware such as hard drives need time to "spin up" to become ready to read, and this often takes a few seconds.  If your machine zipped through POST the Hard Drive wouldn't be ready to boot from.

Basically, the PC is a far more complicated piece of machinery than any console.  All XBox 360's are the same (more or less, depending on revision and model) whereas there's an unlimited number of software/hardware combinations for your PC to deal with.

OD

Ceti Alpha

What doesn't the TG-16 do?  8)
IMG
"Let the CAW and Mystery of a Journey Unlike Any Other Begin"

NecroPhile

Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

Ceti Alpha

QuoteBlast ProcessingTM
haha. I love tossin' out those soft balls for people to hit out of the park.  :P
IMG
"Let the CAW and Mystery of a Journey Unlike Any Other Begin"

Turbo D

Quote from: guest on 01/02/2008, 04:15 PM
Quote from: ceti alpha on 01/02/2008, 03:51 PMWhat doesn't the TG-16 do?  8)
Blast ProcessingTM
If you compare the sega ports on the pce, it appears that it does something better  :P
Quote from: MissaFX on 01/06/2008, 12:10 PMMy idea of gaming is a couple of friends over, a couple of drinks, a couple of medical-handrolled-game-enhancing-cigs and a glowing box you all worship.
IMG IMG
IMG

TurboXray

#17
Quote from: guest on 01/02/2008, 04:15 PM
Quote from: ceti alpha on 01/02/2008, 03:51 PMWhat doesn't the TG-16 do?  8)
Blast ProcessingTM
I think it does Hyper ProcessingTM. Well... that's what I get out of the promo tapes. It's like a hyper active little guy in your TG system, pushing stuff 'll around. Turbo Grafx-16, now you're playing with AHDH power!

Joe Redifer


Turbo D

Quote from: MissaFX on 01/06/2008, 12:10 PMMy idea of gaming is a couple of friends over, a couple of drinks, a couple of medical-handrolled-game-enhancing-cigs and a glowing box you all worship.
IMG IMG
IMG

Kitsunexus

Forgive me, my brain is on par with the Bubble System.
THE CHEMICAL BROTHERS RULE!

Ceti Alpha

What were we talking about?  :P
IMG
"Let the CAW and Mystery of a Journey Unlike Any Other Begin"

NecroPhile

Quote from: ceti alpha on 01/03/2008, 11:13 AMWhat were we talking about?  :P
Oh yeah, the topic - here's Kitsune's answer: IT PLAYS THE GAME, DUMBASS!  :)
Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

Ceti Alpha

QuoteOh yeah, the topic - here's Kitsune's answer: IT PLAYS THE GAME, DUMBASS!  Smile
Sorry, my ADD kicked in and I forgot. heh
IMG
"Let the CAW and Mystery of a Journey Unlike Any Other Begin"