To do this you have to have beaten the elite four with 60 pokemon and Professor Oak will give you the National Dex.
Go to Island One and talk to the scientists near the machine. Go north(^) to the Mountains and you should see two Team Rocket guy next to a cave. Walk up to them and they'll battle with you. Now enter the cave.
Going throught this cave is very easy, you can go wrong. Go until you see a red gem in the middle of the floor on something. It will say that you got Ruby. Take it back to the scientists and he'll give you the Rainbow Ticket. The Rainbow ticket will allow you to got to Islands 1 through 7.
Now you have to go for the Sapphire but you have to go to Island 4 first. Head East(-> until you see a cave. You should need to get Waterfall in this cave before moving on. Save before trying to get waterfall north(^) of the entrance. It's kinda simple to get the HM so you can try it. You'll know when your close when you reach a Mini Puzzle. Ok, now head down then up and u should see a Pokeball containing Waterfall. Collect it and teach it to someone because your going to need it. Exit that part and head to where u enter and surf up the water where the Waterfall is. Use Waterfall and u should go up.
Now head for the ladder. Go on forward and you'll see Lorelei and Team Rocket. Approach them and you'll be in a battle with one of the member. He just has some Zubats and a Goldbat. After beating him, they'll leave. Now talk to Lorelei and now head back to Island 6.
Now you have to go for the Sapphire. Go to the pokemon center and heal and stuff. Now go East to until you see reach the Grassy. This is pretty straight forward. Just go until you reach a Cave that's sealed with Metal Doors.
Walk up to the door and press A. Now use cut and door will open. You'll see a hole. Enter it and you'll drop down. You'll be in a room with 4 holes up, down, left, and right of you. You need to go down the right holes to get the Sapphire. Even if you go down the right room, they'll look alike until you reach the Sapphire. Now head down the holes in the following orders: Go Up, You'll fall down, Now go Left, You'll fall down, Now go Right, You'll fall down, Finally go Down, and you'll see the Sapphire. Approach it click a and you'll see a scientist fall down and he'll steal it from you. Now Head Back To Island 5 To Get Back The Sapphire.
After the sailor takes you there, come out and head Left Ypu should reach a Grassy Area called "Five Isle Meadow". Navigate your way through the grass until you reach a Warehouse (Team Rocket's Warehouse). Click on the door and it will open and you may enter.
You'll see that it looks like the Game Corner Basement. Navigate your way around until you reach a Pokemon Scientist. He Should have the following pokemon: Voltorb, Electrode, Magnemite, Porygon, Magneton. I think this is the correct order of hid pokemon. After defeating him, he'll give you the Sapphire back. Now take it to Island 1 Pokemon Center and give it to the same scientist you gave the Ruby. Now the machine has been repaired and You'll be able to catch Mewtwo in the Unknown Dungeon and Trade with Raby/Sapphire and Fight the Elite Four with stronger pokemon.