Dynamo-generated magnetic field with different inner cores